karma.js 74 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904
  1. (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
  2. module.exports = {
  3. VERSION: '%KARMA_VERSION%',
  4. KARMA_URL_ROOT: '%KARMA_URL_ROOT%',
  5. KARMA_PROXY_PATH: '%KARMA_PROXY_PATH%',
  6. BROWSER_SOCKET_TIMEOUT: '%BROWSER_SOCKET_TIMEOUT%',
  7. CONTEXT_URL: 'context.html'
  8. }
  9. },{}],2:[function(require,module,exports){
  10. var stringify = require('../common/stringify')
  11. var constant = require('./constants')
  12. var util = require('../common/util')
  13. function Karma (updater, socket, iframe, opener, navigator, location, document) {
  14. this.updater = updater
  15. var startEmitted = false
  16. var self = this
  17. var queryParams = util.parseQueryParams(location.search)
  18. var browserId = queryParams.id || util.generateId('manual-')
  19. var displayName = queryParams.displayName
  20. var returnUrl = queryParams['return_url' + ''] || null
  21. var resultsBufferLimit = 50
  22. var resultsBuffer = []
  23. // This is a no-op if not running with a Trusted Types CSP policy, and
  24. // lets tests declare that they trust the way that karma creates and handles
  25. // URLs.
  26. //
  27. // More info about the proposed Trusted Types standard at
  28. // https://github.com/WICG/trusted-types
  29. var policy = {
  30. createURL: function (s) {
  31. return s
  32. },
  33. createScriptURL: function (s) {
  34. return s
  35. }
  36. }
  37. var trustedTypes = window.trustedTypes || window.TrustedTypes
  38. if (trustedTypes) {
  39. policy = trustedTypes.createPolicy('karma', policy)
  40. if (!policy.createURL) {
  41. // Install createURL for newer browsers. Only browsers that implement an
  42. // old version of the spec require createURL.
  43. // Should be safe to delete all reference to createURL by
  44. // February 2020.
  45. // https://github.com/WICG/trusted-types/pull/204
  46. policy.createURL = function (s) { return s }
  47. }
  48. }
  49. // To start we will signal the server that we are not reconnecting. If the socket loses
  50. // connection and was able to reconnect to the Karma server we will get a
  51. // second 'connect' event. There we will pass 'true' and that will be passed to the
  52. // Karma server then, so that Karma can differentiate between a socket client
  53. // econnect and a full browser reconnect.
  54. var socketReconnect = false
  55. this.VERSION = constant.VERSION
  56. this.config = {}
  57. // Expose for testing purposes as there is no global socket.io
  58. // registry anymore.
  59. this.socket = socket
  60. // Set up postMessage bindings for current window
  61. // DEV: These are to allow windows in separate processes execute local tasks
  62. // Electron is one of these environments
  63. if (window.addEventListener) {
  64. window.addEventListener('message', function handleMessage (evt) {
  65. // Resolve the origin of our message
  66. var origin = evt.origin || evt.originalEvent.origin
  67. // If the message isn't from our host, then reject it
  68. if (origin !== window.location.origin) {
  69. return
  70. }
  71. // Take action based on the message type
  72. var method = evt.data.__karmaMethod
  73. if (method) {
  74. if (!self[method]) {
  75. self.error('Received `postMessage` for "' + method + '" but the method doesn\'t exist')
  76. return
  77. }
  78. self[method].apply(self, evt.data.__karmaArguments)
  79. }
  80. }, false)
  81. }
  82. var childWindow = null
  83. function navigateContextTo (url) {
  84. if (self.config.useIframe === false) {
  85. // run in new window
  86. if (self.config.runInParent === false) {
  87. // If there is a window already open, then close it
  88. // DEV: In some environments (e.g. Electron), we don't have setter access for location
  89. if (childWindow !== null && childWindow.closed !== true) {
  90. // The onbeforeunload listener was added by context to catch
  91. // unexpected navigations while running tests.
  92. childWindow.onbeforeunload = undefined
  93. childWindow.close()
  94. }
  95. childWindow = opener(url)
  96. if (childWindow === null) {
  97. self.error('Opening a new tab/window failed, probably because pop-ups are blocked.')
  98. }
  99. // run context on parent element (client_with_context)
  100. // using window.__karma__.scriptUrls to get the html element strings and load them dynamically
  101. } else if (url !== 'about:blank') {
  102. var loadScript = function (idx) {
  103. if (idx < window.__karma__.scriptUrls.length) {
  104. var parser = new DOMParser()
  105. // Revert escaped characters with special roles in HTML before parsing
  106. var string = window.__karma__.scriptUrls[idx]
  107. .replace(/\\x3C/g, '<')
  108. .replace(/\\x3E/g, '>')
  109. var doc = parser.parseFromString(string, 'text/html')
  110. var ele = doc.head.firstChild || doc.body.firstChild
  111. // script elements created by DomParser are marked as unexecutable,
  112. // create a new script element manually and copy necessary properties
  113. // so it is executable
  114. if (ele.tagName && ele.tagName.toLowerCase() === 'script') {
  115. var tmp = ele
  116. ele = document.createElement('script')
  117. ele.src = policy.createScriptURL(tmp.src)
  118. ele.crossOrigin = tmp.crossOrigin
  119. }
  120. ele.onload = function () {
  121. loadScript(idx + 1)
  122. }
  123. document.body.appendChild(ele)
  124. } else {
  125. window.__karma__.loaded()
  126. }
  127. }
  128. loadScript(0)
  129. }
  130. // run in iframe
  131. } else {
  132. // The onbeforeunload listener was added by the context to catch
  133. // unexpected navigations while running tests.
  134. iframe.contentWindow.onbeforeunload = undefined
  135. iframe.src = policy.createURL(url)
  136. }
  137. }
  138. this.log = function (type, args) {
  139. var values = []
  140. for (var i = 0; i < args.length; i++) {
  141. values.push(this.stringify(args[i], 3))
  142. }
  143. this.info({ log: values.join(', '), type: type })
  144. }
  145. this.stringify = stringify
  146. function getLocation (url, lineno, colno) {
  147. var location = ''
  148. if (url !== undefined) {
  149. location += url
  150. }
  151. if (lineno !== undefined) {
  152. location += ':' + lineno
  153. }
  154. if (colno !== undefined) {
  155. location += ':' + colno
  156. }
  157. return location
  158. }
  159. // error during js file loading (most likely syntax error)
  160. // we are not going to execute at all. `window.onerror` callback.
  161. this.error = function (messageOrEvent, source, lineno, colno, error) {
  162. var message
  163. if (typeof messageOrEvent === 'string') {
  164. message = messageOrEvent
  165. var location = getLocation(source, lineno, colno)
  166. if (location !== '') {
  167. message += '\nat ' + location
  168. }
  169. if (error && error.stack) {
  170. message += '\n\n' + error.stack
  171. }
  172. } else {
  173. // create an object with the string representation of the message to
  174. // ensure all its content is properly transferred to the console log
  175. message = { message: messageOrEvent, str: messageOrEvent.toString() }
  176. }
  177. socket.emit('karma_error', message)
  178. self.updater.updateTestStatus('karma_error ' + message)
  179. this.complete()
  180. return false
  181. }
  182. this.result = function (originalResult) {
  183. var convertedResult = {}
  184. // Convert all array-like objects to real arrays.
  185. for (var propertyName in originalResult) {
  186. if (Object.prototype.hasOwnProperty.call(originalResult, propertyName)) {
  187. var propertyValue = originalResult[propertyName]
  188. if (Object.prototype.toString.call(propertyValue) === '[object Array]') {
  189. convertedResult[propertyName] = Array.prototype.slice.call(propertyValue)
  190. } else {
  191. convertedResult[propertyName] = propertyValue
  192. }
  193. }
  194. }
  195. if (!startEmitted) {
  196. socket.emit('start', { total: null })
  197. self.updater.updateTestStatus('start')
  198. startEmitted = true
  199. }
  200. if (resultsBufferLimit === 1) {
  201. self.updater.updateTestStatus('result')
  202. return socket.emit('result', convertedResult)
  203. }
  204. resultsBuffer.push(convertedResult)
  205. if (resultsBuffer.length === resultsBufferLimit) {
  206. socket.emit('result', resultsBuffer)
  207. self.updater.updateTestStatus('result')
  208. resultsBuffer = []
  209. }
  210. }
  211. this.complete = function (result) {
  212. if (resultsBuffer.length) {
  213. socket.emit('result', resultsBuffer)
  214. resultsBuffer = []
  215. }
  216. socket.emit('complete', result || {})
  217. if (this.config.clearContext) {
  218. navigateContextTo('about:blank')
  219. } else {
  220. self.updater.updateTestStatus('complete')
  221. }
  222. if (returnUrl) {
  223. var isReturnUrlAllowed = false
  224. for (var i = 0; i < this.config.allowedReturnUrlPatterns.length; i++) {
  225. var allowedReturnUrlPattern = new RegExp(this.config.allowedReturnUrlPatterns[i])
  226. if (allowedReturnUrlPattern.test(returnUrl)) {
  227. isReturnUrlAllowed = true
  228. break
  229. }
  230. }
  231. if (!isReturnUrlAllowed) {
  232. throw new Error(
  233. 'Security: Navigation to '.concat(
  234. returnUrl,
  235. ' was blocked to prevent malicious exploits.'
  236. )
  237. )
  238. }
  239. location.href = returnUrl
  240. }
  241. }
  242. this.info = function (info) {
  243. // TODO(vojta): introduce special API for this
  244. if (!startEmitted && util.isDefined(info.total)) {
  245. socket.emit('start', info)
  246. startEmitted = true
  247. } else {
  248. socket.emit('info', info)
  249. }
  250. }
  251. socket.on('execute', function (cfg) {
  252. self.updater.updateTestStatus('execute')
  253. // reset startEmitted and reload the iframe
  254. startEmitted = false
  255. self.config = cfg
  256. navigateContextTo(constant.CONTEXT_URL)
  257. if (self.config.clientDisplayNone) {
  258. [].forEach.call(document.querySelectorAll('#banner, #browsers'), function (el) {
  259. el.style.display = 'none'
  260. })
  261. }
  262. // clear the console before run
  263. // works only on FF (Safari, Chrome do not allow to clear console from js source)
  264. if (window.console && window.console.clear) {
  265. window.console.clear()
  266. }
  267. })
  268. socket.on('stop', function () {
  269. this.complete()
  270. }.bind(this))
  271. // Report the browser name and Id. Note that this event can also fire if the connection has
  272. // been temporarily lost, but the socket reconnected automatically. Read more in the docs:
  273. // https://socket.io/docs/client-api/#Event-%E2%80%98connect%E2%80%99
  274. socket.on('connect', function () {
  275. socket.io.engine.on('upgrade', function () {
  276. resultsBufferLimit = 1
  277. // Flush any results which were buffered before the upgrade to WebSocket protocol.
  278. if (resultsBuffer.length > 0) {
  279. socket.emit('result', resultsBuffer)
  280. resultsBuffer = []
  281. }
  282. })
  283. var info = {
  284. name: navigator.userAgent,
  285. id: browserId,
  286. isSocketReconnect: socketReconnect
  287. }
  288. if (displayName) {
  289. info.displayName = displayName
  290. }
  291. socket.emit('register', info)
  292. socketReconnect = true
  293. })
  294. }
  295. module.exports = Karma
  296. },{"../common/stringify":5,"../common/util":6,"./constants":1}],3:[function(require,module,exports){
  297. /* global io */
  298. /* eslint-disable no-new */
  299. var Karma = require('./karma')
  300. var StatusUpdater = require('./updater')
  301. var util = require('../common/util')
  302. var constants = require('./constants')
  303. var KARMA_URL_ROOT = constants.KARMA_URL_ROOT
  304. var KARMA_PROXY_PATH = constants.KARMA_PROXY_PATH
  305. var BROWSER_SOCKET_TIMEOUT = constants.BROWSER_SOCKET_TIMEOUT
  306. // Connect to the server using socket.io https://socket.io/
  307. var socket = io(location.host, {
  308. reconnectionDelay: 500,
  309. reconnectionDelayMax: Infinity,
  310. timeout: BROWSER_SOCKET_TIMEOUT,
  311. path: KARMA_PROXY_PATH + KARMA_URL_ROOT.slice(1) + 'socket.io',
  312. 'sync disconnect on unload': true,
  313. useNativeTimers: true
  314. })
  315. // instantiate the updater of the view
  316. var updater = new StatusUpdater(socket, util.elm('title'), util.elm('banner'), util.elm('browsers'))
  317. window.karma = new Karma(updater, socket, util.elm('context'), window.open,
  318. window.navigator, window.location, window.document)
  319. },{"../common/util":6,"./constants":1,"./karma":2,"./updater":4}],4:[function(require,module,exports){
  320. var VERSION = require('./constants').VERSION
  321. function StatusUpdater (socket, titleElement, bannerElement, browsersElement) {
  322. function updateBrowsersInfo (browsers) {
  323. if (!browsersElement) {
  324. return
  325. }
  326. var status
  327. // clear browsersElement
  328. while (browsersElement.firstChild) {
  329. browsersElement.removeChild(browsersElement.firstChild)
  330. }
  331. for (var i = 0; i < browsers.length; i++) {
  332. status = browsers[i].isConnected ? 'idle' : 'executing'
  333. var li = document.createElement('li')
  334. li.setAttribute('class', status)
  335. li.textContent = browsers[i].name + ' is ' + status
  336. browsersElement.appendChild(li)
  337. }
  338. }
  339. var connectionText = 'never-connected'
  340. var testText = 'loading'
  341. var pingText = ''
  342. function updateBanner () {
  343. if (!titleElement || !bannerElement) {
  344. return
  345. }
  346. titleElement.textContent = 'Karma v ' + VERSION + ' - ' + connectionText + '; test: ' + testText + '; ' + pingText
  347. bannerElement.className = connectionText === 'connected' ? 'online' : 'offline'
  348. }
  349. function updateConnectionStatus (connectionStatus) {
  350. connectionText = connectionStatus || connectionText
  351. updateBanner()
  352. }
  353. function updateTestStatus (testStatus) {
  354. testText = testStatus || testText
  355. updateBanner()
  356. }
  357. function updatePingStatus (pingStatus) {
  358. pingText = pingStatus || pingText
  359. updateBanner()
  360. }
  361. socket.on('connect', function () {
  362. updateConnectionStatus('connected')
  363. })
  364. socket.on('disconnect', function () {
  365. updateConnectionStatus('disconnected')
  366. })
  367. socket.on('reconnecting', function (sec) {
  368. updateConnectionStatus('reconnecting in ' + sec + ' seconds')
  369. })
  370. socket.on('reconnect', function () {
  371. updateConnectionStatus('reconnected')
  372. })
  373. socket.on('reconnect_failed', function () {
  374. updateConnectionStatus('reconnect_failed')
  375. })
  376. socket.on('info', updateBrowsersInfo)
  377. socket.on('disconnect', function () {
  378. updateBrowsersInfo([])
  379. })
  380. socket.on('ping', function () {
  381. updatePingStatus('ping...')
  382. })
  383. socket.on('pong', function (latency) {
  384. updatePingStatus('ping ' + latency + 'ms')
  385. })
  386. return { updateTestStatus: updateTestStatus }
  387. }
  388. module.exports = StatusUpdater
  389. },{"./constants":1}],5:[function(require,module,exports){
  390. var serialize = null
  391. try {
  392. serialize = require('dom-serialize')
  393. } catch (e) {
  394. // Ignore failure on IE8
  395. }
  396. var instanceOf = require('./util').instanceOf
  397. function isNode (obj) {
  398. return (obj.tagName || obj.nodeName) && obj.nodeType
  399. }
  400. function stringify (obj, depth) {
  401. if (depth === 0) {
  402. return '...'
  403. }
  404. if (obj === null) {
  405. return 'null'
  406. }
  407. switch (typeof obj) {
  408. case 'symbol':
  409. return obj.toString()
  410. case 'string':
  411. return "'" + obj + "'"
  412. case 'undefined':
  413. return 'undefined'
  414. case 'function':
  415. try {
  416. // function abc(a, b, c) { /* code goes here */ }
  417. // -> function abc(a, b, c) { ... }
  418. return obj.toString().replace(/\{[\s\S]*\}/, '{ ... }')
  419. } catch (err) {
  420. if (err instanceof TypeError) {
  421. // Support older browsers
  422. return 'function ' + (obj.name || '') + '() { ... }'
  423. } else {
  424. throw err
  425. }
  426. }
  427. case 'boolean':
  428. return obj ? 'true' : 'false'
  429. case 'object':
  430. var strs = []
  431. if (instanceOf(obj, 'Array')) {
  432. strs.push('[')
  433. for (var i = 0, ii = obj.length; i < ii; i++) {
  434. if (i) {
  435. strs.push(', ')
  436. }
  437. strs.push(stringify(obj[i], depth - 1))
  438. }
  439. strs.push(']')
  440. } else if (instanceOf(obj, 'Date')) {
  441. return obj.toString()
  442. } else if (instanceOf(obj, 'Text')) {
  443. return obj.nodeValue
  444. } else if (instanceOf(obj, 'Comment')) {
  445. return '<!--' + obj.nodeValue + '-->'
  446. } else if (obj.outerHTML) {
  447. return obj.outerHTML
  448. } else if (isNode(obj)) {
  449. if (serialize) {
  450. return serialize(obj)
  451. } else {
  452. return 'Skipping stringify, no support for dom-serialize'
  453. }
  454. } else if (instanceOf(obj, 'Error')) {
  455. return obj.toString() + '\n' + obj.stack
  456. } else {
  457. var constructor = 'Object'
  458. if (obj.constructor && typeof obj.constructor === 'function') {
  459. constructor = obj.constructor.name
  460. }
  461. strs.push(constructor)
  462. strs.push('{')
  463. var first = true
  464. for (var key in obj) {
  465. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  466. if (first) {
  467. first = false
  468. } else {
  469. strs.push(', ')
  470. }
  471. strs.push(key + ': ' + stringify(obj[key], depth - 1))
  472. }
  473. }
  474. strs.push('}')
  475. }
  476. return strs.join('')
  477. default:
  478. return obj
  479. }
  480. }
  481. module.exports = stringify
  482. },{"./util":6,"dom-serialize":8}],6:[function(require,module,exports){
  483. exports.instanceOf = function (value, constructorName) {
  484. return Object.prototype.toString.apply(value) === '[object ' + constructorName + ']'
  485. }
  486. exports.elm = function (id) {
  487. return document.getElementById(id)
  488. }
  489. exports.generateId = function (prefix) {
  490. return prefix + Math.floor(Math.random() * 10000)
  491. }
  492. exports.isUndefined = function (value) {
  493. return typeof value === 'undefined'
  494. }
  495. exports.isDefined = function (value) {
  496. return !exports.isUndefined(value)
  497. }
  498. exports.parseQueryParams = function (locationSearch) {
  499. var params = {}
  500. var pairs = locationSearch.slice(1).split('&')
  501. var keyValue
  502. for (var i = 0; i < pairs.length; i++) {
  503. keyValue = pairs[i].split('=')
  504. params[decodeURIComponent(keyValue[0])] = decodeURIComponent(keyValue[1])
  505. }
  506. return params
  507. }
  508. },{}],7:[function(require,module,exports){
  509. (function (global){
  510. var NativeCustomEvent = global.CustomEvent;
  511. function useNative () {
  512. try {
  513. var p = new NativeCustomEvent('cat', { detail: { foo: 'bar' } });
  514. return 'cat' === p.type && 'bar' === p.detail.foo;
  515. } catch (e) {
  516. }
  517. return false;
  518. }
  519. /**
  520. * Cross-browser `CustomEvent` constructor.
  521. *
  522. * https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent.CustomEvent
  523. *
  524. * @public
  525. */
  526. module.exports = useNative() ? NativeCustomEvent :
  527. // IE >= 9
  528. 'undefined' !== typeof document && 'function' === typeof document.createEvent ? function CustomEvent (type, params) {
  529. var e = document.createEvent('CustomEvent');
  530. if (params) {
  531. e.initCustomEvent(type, params.bubbles, params.cancelable, params.detail);
  532. } else {
  533. e.initCustomEvent(type, false, false, void 0);
  534. }
  535. return e;
  536. } :
  537. // IE <= 8
  538. function CustomEvent (type, params) {
  539. var e = document.createEventObject();
  540. e.type = type;
  541. if (params) {
  542. e.bubbles = Boolean(params.bubbles);
  543. e.cancelable = Boolean(params.cancelable);
  544. e.detail = params.detail;
  545. } else {
  546. e.bubbles = false;
  547. e.cancelable = false;
  548. e.detail = void 0;
  549. }
  550. return e;
  551. }
  552. }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
  553. },{}],8:[function(require,module,exports){
  554. /**
  555. * Module dependencies.
  556. */
  557. var extend = require('extend');
  558. var encode = require('ent/encode');
  559. var CustomEvent = require('custom-event');
  560. var voidElements = require('void-elements');
  561. /**
  562. * Module exports.
  563. */
  564. exports = module.exports = serialize;
  565. exports.serializeElement = serializeElement;
  566. exports.serializeAttribute = serializeAttribute;
  567. exports.serializeText = serializeText;
  568. exports.serializeComment = serializeComment;
  569. exports.serializeDocument = serializeDocument;
  570. exports.serializeDoctype = serializeDoctype;
  571. exports.serializeDocumentFragment = serializeDocumentFragment;
  572. exports.serializeNodeList = serializeNodeList;
  573. /**
  574. * Serializes any DOM node. Returns a string.
  575. *
  576. * @param {Node} node - DOM Node to serialize
  577. * @param {String} [context] - optional arbitrary "context" string to use (useful for event listeners)
  578. * @param {Function} [fn] - optional callback function to use in the "serialize" event for this call
  579. * @param {EventTarget} [eventTarget] - optional EventTarget instance to emit the "serialize" event on (defaults to `node`)
  580. * return {String}
  581. * @public
  582. */
  583. function serialize (node, context, fn, eventTarget) {
  584. if (!node) return '';
  585. if ('function' === typeof context) {
  586. fn = context;
  587. context = null;
  588. }
  589. if (!context) context = null;
  590. var rtn;
  591. var nodeType = node.nodeType;
  592. if (!nodeType && 'number' === typeof node.length) {
  593. // assume it's a NodeList or Array of Nodes
  594. rtn = exports.serializeNodeList(node, context, fn);
  595. } else {
  596. if ('function' === typeof fn) {
  597. // one-time "serialize" event listener
  598. node.addEventListener('serialize', fn, false);
  599. }
  600. // emit a custom "serialize" event on `node`, in case there
  601. // are event listeners for custom serialization of this node
  602. var e = new CustomEvent('serialize', {
  603. bubbles: true,
  604. cancelable: true,
  605. detail: {
  606. serialize: null,
  607. context: context
  608. }
  609. });
  610. e.serializeTarget = node;
  611. var target = eventTarget || node;
  612. var cancelled = !target.dispatchEvent(e);
  613. // `e.detail.serialize` can be set to a:
  614. // String - returned directly
  615. // Node - goes through serializer logic instead of `node`
  616. // Anything else - get Stringified first, and then returned directly
  617. var s = e.detail.serialize;
  618. if (s != null) {
  619. if ('string' === typeof s) {
  620. rtn = s;
  621. } else if ('number' === typeof s.nodeType) {
  622. // make it go through the serialization logic
  623. rtn = serialize(s, context, null, target);
  624. } else {
  625. rtn = String(s);
  626. }
  627. } else if (!cancelled) {
  628. // default serialization logic
  629. switch (nodeType) {
  630. case 1 /* element */:
  631. rtn = exports.serializeElement(node, context, eventTarget);
  632. break;
  633. case 2 /* attribute */:
  634. rtn = exports.serializeAttribute(node);
  635. break;
  636. case 3 /* text */:
  637. rtn = exports.serializeText(node);
  638. break;
  639. case 8 /* comment */:
  640. rtn = exports.serializeComment(node);
  641. break;
  642. case 9 /* document */:
  643. rtn = exports.serializeDocument(node, context, eventTarget);
  644. break;
  645. case 10 /* doctype */:
  646. rtn = exports.serializeDoctype(node);
  647. break;
  648. case 11 /* document fragment */:
  649. rtn = exports.serializeDocumentFragment(node, context, eventTarget);
  650. break;
  651. }
  652. }
  653. if ('function' === typeof fn) {
  654. node.removeEventListener('serialize', fn, false);
  655. }
  656. }
  657. return rtn || '';
  658. }
  659. /**
  660. * Serialize an Attribute node.
  661. */
  662. function serializeAttribute (node, opts) {
  663. return node.name + '="' + encode(node.value, extend({
  664. named: true
  665. }, opts)) + '"';
  666. }
  667. /**
  668. * Serialize a DOM element.
  669. */
  670. function serializeElement (node, context, eventTarget) {
  671. var c, i, l;
  672. var name = node.nodeName.toLowerCase();
  673. // opening tag
  674. var r = '<' + name;
  675. // attributes
  676. for (i = 0, c = node.attributes, l = c.length; i < l; i++) {
  677. r += ' ' + exports.serializeAttribute(c[i]);
  678. }
  679. r += '>';
  680. // child nodes
  681. r += exports.serializeNodeList(node.childNodes, context, null, eventTarget);
  682. // closing tag, only for non-void elements
  683. if (!voidElements[name]) {
  684. r += '</' + name + '>';
  685. }
  686. return r;
  687. }
  688. /**
  689. * Serialize a text node.
  690. */
  691. function serializeText (node, opts) {
  692. return encode(node.nodeValue, extend({
  693. named: true,
  694. special: { '<': true, '>': true, '&': true }
  695. }, opts));
  696. }
  697. /**
  698. * Serialize a comment node.
  699. */
  700. function serializeComment (node) {
  701. return '<!--' + node.nodeValue + '-->';
  702. }
  703. /**
  704. * Serialize a Document node.
  705. */
  706. function serializeDocument (node, context, eventTarget) {
  707. return exports.serializeNodeList(node.childNodes, context, null, eventTarget);
  708. }
  709. /**
  710. * Serialize a DOCTYPE node.
  711. * See: http://stackoverflow.com/a/10162353
  712. */
  713. function serializeDoctype (node) {
  714. var r = '<!DOCTYPE ' + node.name;
  715. if (node.publicId) {
  716. r += ' PUBLIC "' + node.publicId + '"';
  717. }
  718. if (!node.publicId && node.systemId) {
  719. r += ' SYSTEM';
  720. }
  721. if (node.systemId) {
  722. r += ' "' + node.systemId + '"';
  723. }
  724. r += '>';
  725. return r;
  726. }
  727. /**
  728. * Serialize a DocumentFragment instance.
  729. */
  730. function serializeDocumentFragment (node, context, eventTarget) {
  731. return exports.serializeNodeList(node.childNodes, context, null, eventTarget);
  732. }
  733. /**
  734. * Serialize a NodeList/Array of nodes.
  735. */
  736. function serializeNodeList (list, context, fn, eventTarget) {
  737. var r = '';
  738. for (var i = 0, l = list.length; i < l; i++) {
  739. r += serialize(list[i], context, fn, eventTarget);
  740. }
  741. return r;
  742. }
  743. },{"custom-event":7,"ent/encode":9,"extend":11,"void-elements":13}],9:[function(require,module,exports){
  744. var punycode = require('punycode');
  745. var revEntities = require('./reversed.json');
  746. module.exports = encode;
  747. function encode (str, opts) {
  748. if (typeof str !== 'string') {
  749. throw new TypeError('Expected a String');
  750. }
  751. if (!opts) opts = {};
  752. var numeric = true;
  753. if (opts.named) numeric = false;
  754. if (opts.numeric !== undefined) numeric = opts.numeric;
  755. var special = opts.special || {
  756. '"': true, "'": true,
  757. '<': true, '>': true,
  758. '&': true
  759. };
  760. var codePoints = punycode.ucs2.decode(str);
  761. var chars = [];
  762. for (var i = 0; i < codePoints.length; i++) {
  763. var cc = codePoints[i];
  764. var c = punycode.ucs2.encode([ cc ]);
  765. var e = revEntities[cc];
  766. if (e && (cc >= 127 || special[c]) && !numeric) {
  767. chars.push('&' + (/;$/.test(e) ? e : e + ';'));
  768. }
  769. else if (cc < 32 || cc >= 127 || special[c]) {
  770. chars.push('&#' + cc + ';');
  771. }
  772. else {
  773. chars.push(c);
  774. }
  775. }
  776. return chars.join('');
  777. }
  778. },{"./reversed.json":10,"punycode":12}],10:[function(require,module,exports){
  779. module.exports={
  780. "9": "Tab;",
  781. "10": "NewLine;",
  782. "33": "excl;",
  783. "34": "quot;",
  784. "35": "num;",
  785. "36": "dollar;",
  786. "37": "percnt;",
  787. "38": "amp;",
  788. "39": "apos;",
  789. "40": "lpar;",
  790. "41": "rpar;",
  791. "42": "midast;",
  792. "43": "plus;",
  793. "44": "comma;",
  794. "46": "period;",
  795. "47": "sol;",
  796. "58": "colon;",
  797. "59": "semi;",
  798. "60": "lt;",
  799. "61": "equals;",
  800. "62": "gt;",
  801. "63": "quest;",
  802. "64": "commat;",
  803. "91": "lsqb;",
  804. "92": "bsol;",
  805. "93": "rsqb;",
  806. "94": "Hat;",
  807. "95": "UnderBar;",
  808. "96": "grave;",
  809. "123": "lcub;",
  810. "124": "VerticalLine;",
  811. "125": "rcub;",
  812. "160": "NonBreakingSpace;",
  813. "161": "iexcl;",
  814. "162": "cent;",
  815. "163": "pound;",
  816. "164": "curren;",
  817. "165": "yen;",
  818. "166": "brvbar;",
  819. "167": "sect;",
  820. "168": "uml;",
  821. "169": "copy;",
  822. "170": "ordf;",
  823. "171": "laquo;",
  824. "172": "not;",
  825. "173": "shy;",
  826. "174": "reg;",
  827. "175": "strns;",
  828. "176": "deg;",
  829. "177": "pm;",
  830. "178": "sup2;",
  831. "179": "sup3;",
  832. "180": "DiacriticalAcute;",
  833. "181": "micro;",
  834. "182": "para;",
  835. "183": "middot;",
  836. "184": "Cedilla;",
  837. "185": "sup1;",
  838. "186": "ordm;",
  839. "187": "raquo;",
  840. "188": "frac14;",
  841. "189": "half;",
  842. "190": "frac34;",
  843. "191": "iquest;",
  844. "192": "Agrave;",
  845. "193": "Aacute;",
  846. "194": "Acirc;",
  847. "195": "Atilde;",
  848. "196": "Auml;",
  849. "197": "Aring;",
  850. "198": "AElig;",
  851. "199": "Ccedil;",
  852. "200": "Egrave;",
  853. "201": "Eacute;",
  854. "202": "Ecirc;",
  855. "203": "Euml;",
  856. "204": "Igrave;",
  857. "205": "Iacute;",
  858. "206": "Icirc;",
  859. "207": "Iuml;",
  860. "208": "ETH;",
  861. "209": "Ntilde;",
  862. "210": "Ograve;",
  863. "211": "Oacute;",
  864. "212": "Ocirc;",
  865. "213": "Otilde;",
  866. "214": "Ouml;",
  867. "215": "times;",
  868. "216": "Oslash;",
  869. "217": "Ugrave;",
  870. "218": "Uacute;",
  871. "219": "Ucirc;",
  872. "220": "Uuml;",
  873. "221": "Yacute;",
  874. "222": "THORN;",
  875. "223": "szlig;",
  876. "224": "agrave;",
  877. "225": "aacute;",
  878. "226": "acirc;",
  879. "227": "atilde;",
  880. "228": "auml;",
  881. "229": "aring;",
  882. "230": "aelig;",
  883. "231": "ccedil;",
  884. "232": "egrave;",
  885. "233": "eacute;",
  886. "234": "ecirc;",
  887. "235": "euml;",
  888. "236": "igrave;",
  889. "237": "iacute;",
  890. "238": "icirc;",
  891. "239": "iuml;",
  892. "240": "eth;",
  893. "241": "ntilde;",
  894. "242": "ograve;",
  895. "243": "oacute;",
  896. "244": "ocirc;",
  897. "245": "otilde;",
  898. "246": "ouml;",
  899. "247": "divide;",
  900. "248": "oslash;",
  901. "249": "ugrave;",
  902. "250": "uacute;",
  903. "251": "ucirc;",
  904. "252": "uuml;",
  905. "253": "yacute;",
  906. "254": "thorn;",
  907. "255": "yuml;",
  908. "256": "Amacr;",
  909. "257": "amacr;",
  910. "258": "Abreve;",
  911. "259": "abreve;",
  912. "260": "Aogon;",
  913. "261": "aogon;",
  914. "262": "Cacute;",
  915. "263": "cacute;",
  916. "264": "Ccirc;",
  917. "265": "ccirc;",
  918. "266": "Cdot;",
  919. "267": "cdot;",
  920. "268": "Ccaron;",
  921. "269": "ccaron;",
  922. "270": "Dcaron;",
  923. "271": "dcaron;",
  924. "272": "Dstrok;",
  925. "273": "dstrok;",
  926. "274": "Emacr;",
  927. "275": "emacr;",
  928. "278": "Edot;",
  929. "279": "edot;",
  930. "280": "Eogon;",
  931. "281": "eogon;",
  932. "282": "Ecaron;",
  933. "283": "ecaron;",
  934. "284": "Gcirc;",
  935. "285": "gcirc;",
  936. "286": "Gbreve;",
  937. "287": "gbreve;",
  938. "288": "Gdot;",
  939. "289": "gdot;",
  940. "290": "Gcedil;",
  941. "292": "Hcirc;",
  942. "293": "hcirc;",
  943. "294": "Hstrok;",
  944. "295": "hstrok;",
  945. "296": "Itilde;",
  946. "297": "itilde;",
  947. "298": "Imacr;",
  948. "299": "imacr;",
  949. "302": "Iogon;",
  950. "303": "iogon;",
  951. "304": "Idot;",
  952. "305": "inodot;",
  953. "306": "IJlig;",
  954. "307": "ijlig;",
  955. "308": "Jcirc;",
  956. "309": "jcirc;",
  957. "310": "Kcedil;",
  958. "311": "kcedil;",
  959. "312": "kgreen;",
  960. "313": "Lacute;",
  961. "314": "lacute;",
  962. "315": "Lcedil;",
  963. "316": "lcedil;",
  964. "317": "Lcaron;",
  965. "318": "lcaron;",
  966. "319": "Lmidot;",
  967. "320": "lmidot;",
  968. "321": "Lstrok;",
  969. "322": "lstrok;",
  970. "323": "Nacute;",
  971. "324": "nacute;",
  972. "325": "Ncedil;",
  973. "326": "ncedil;",
  974. "327": "Ncaron;",
  975. "328": "ncaron;",
  976. "329": "napos;",
  977. "330": "ENG;",
  978. "331": "eng;",
  979. "332": "Omacr;",
  980. "333": "omacr;",
  981. "336": "Odblac;",
  982. "337": "odblac;",
  983. "338": "OElig;",
  984. "339": "oelig;",
  985. "340": "Racute;",
  986. "341": "racute;",
  987. "342": "Rcedil;",
  988. "343": "rcedil;",
  989. "344": "Rcaron;",
  990. "345": "rcaron;",
  991. "346": "Sacute;",
  992. "347": "sacute;",
  993. "348": "Scirc;",
  994. "349": "scirc;",
  995. "350": "Scedil;",
  996. "351": "scedil;",
  997. "352": "Scaron;",
  998. "353": "scaron;",
  999. "354": "Tcedil;",
  1000. "355": "tcedil;",
  1001. "356": "Tcaron;",
  1002. "357": "tcaron;",
  1003. "358": "Tstrok;",
  1004. "359": "tstrok;",
  1005. "360": "Utilde;",
  1006. "361": "utilde;",
  1007. "362": "Umacr;",
  1008. "363": "umacr;",
  1009. "364": "Ubreve;",
  1010. "365": "ubreve;",
  1011. "366": "Uring;",
  1012. "367": "uring;",
  1013. "368": "Udblac;",
  1014. "369": "udblac;",
  1015. "370": "Uogon;",
  1016. "371": "uogon;",
  1017. "372": "Wcirc;",
  1018. "373": "wcirc;",
  1019. "374": "Ycirc;",
  1020. "375": "ycirc;",
  1021. "376": "Yuml;",
  1022. "377": "Zacute;",
  1023. "378": "zacute;",
  1024. "379": "Zdot;",
  1025. "380": "zdot;",
  1026. "381": "Zcaron;",
  1027. "382": "zcaron;",
  1028. "402": "fnof;",
  1029. "437": "imped;",
  1030. "501": "gacute;",
  1031. "567": "jmath;",
  1032. "710": "circ;",
  1033. "711": "Hacek;",
  1034. "728": "breve;",
  1035. "729": "dot;",
  1036. "730": "ring;",
  1037. "731": "ogon;",
  1038. "732": "tilde;",
  1039. "733": "DiacriticalDoubleAcute;",
  1040. "785": "DownBreve;",
  1041. "913": "Alpha;",
  1042. "914": "Beta;",
  1043. "915": "Gamma;",
  1044. "916": "Delta;",
  1045. "917": "Epsilon;",
  1046. "918": "Zeta;",
  1047. "919": "Eta;",
  1048. "920": "Theta;",
  1049. "921": "Iota;",
  1050. "922": "Kappa;",
  1051. "923": "Lambda;",
  1052. "924": "Mu;",
  1053. "925": "Nu;",
  1054. "926": "Xi;",
  1055. "927": "Omicron;",
  1056. "928": "Pi;",
  1057. "929": "Rho;",
  1058. "931": "Sigma;",
  1059. "932": "Tau;",
  1060. "933": "Upsilon;",
  1061. "934": "Phi;",
  1062. "935": "Chi;",
  1063. "936": "Psi;",
  1064. "937": "Omega;",
  1065. "945": "alpha;",
  1066. "946": "beta;",
  1067. "947": "gamma;",
  1068. "948": "delta;",
  1069. "949": "epsilon;",
  1070. "950": "zeta;",
  1071. "951": "eta;",
  1072. "952": "theta;",
  1073. "953": "iota;",
  1074. "954": "kappa;",
  1075. "955": "lambda;",
  1076. "956": "mu;",
  1077. "957": "nu;",
  1078. "958": "xi;",
  1079. "959": "omicron;",
  1080. "960": "pi;",
  1081. "961": "rho;",
  1082. "962": "varsigma;",
  1083. "963": "sigma;",
  1084. "964": "tau;",
  1085. "965": "upsilon;",
  1086. "966": "phi;",
  1087. "967": "chi;",
  1088. "968": "psi;",
  1089. "969": "omega;",
  1090. "977": "vartheta;",
  1091. "978": "upsih;",
  1092. "981": "varphi;",
  1093. "982": "varpi;",
  1094. "988": "Gammad;",
  1095. "989": "gammad;",
  1096. "1008": "varkappa;",
  1097. "1009": "varrho;",
  1098. "1013": "varepsilon;",
  1099. "1014": "bepsi;",
  1100. "1025": "IOcy;",
  1101. "1026": "DJcy;",
  1102. "1027": "GJcy;",
  1103. "1028": "Jukcy;",
  1104. "1029": "DScy;",
  1105. "1030": "Iukcy;",
  1106. "1031": "YIcy;",
  1107. "1032": "Jsercy;",
  1108. "1033": "LJcy;",
  1109. "1034": "NJcy;",
  1110. "1035": "TSHcy;",
  1111. "1036": "KJcy;",
  1112. "1038": "Ubrcy;",
  1113. "1039": "DZcy;",
  1114. "1040": "Acy;",
  1115. "1041": "Bcy;",
  1116. "1042": "Vcy;",
  1117. "1043": "Gcy;",
  1118. "1044": "Dcy;",
  1119. "1045": "IEcy;",
  1120. "1046": "ZHcy;",
  1121. "1047": "Zcy;",
  1122. "1048": "Icy;",
  1123. "1049": "Jcy;",
  1124. "1050": "Kcy;",
  1125. "1051": "Lcy;",
  1126. "1052": "Mcy;",
  1127. "1053": "Ncy;",
  1128. "1054": "Ocy;",
  1129. "1055": "Pcy;",
  1130. "1056": "Rcy;",
  1131. "1057": "Scy;",
  1132. "1058": "Tcy;",
  1133. "1059": "Ucy;",
  1134. "1060": "Fcy;",
  1135. "1061": "KHcy;",
  1136. "1062": "TScy;",
  1137. "1063": "CHcy;",
  1138. "1064": "SHcy;",
  1139. "1065": "SHCHcy;",
  1140. "1066": "HARDcy;",
  1141. "1067": "Ycy;",
  1142. "1068": "SOFTcy;",
  1143. "1069": "Ecy;",
  1144. "1070": "YUcy;",
  1145. "1071": "YAcy;",
  1146. "1072": "acy;",
  1147. "1073": "bcy;",
  1148. "1074": "vcy;",
  1149. "1075": "gcy;",
  1150. "1076": "dcy;",
  1151. "1077": "iecy;",
  1152. "1078": "zhcy;",
  1153. "1079": "zcy;",
  1154. "1080": "icy;",
  1155. "1081": "jcy;",
  1156. "1082": "kcy;",
  1157. "1083": "lcy;",
  1158. "1084": "mcy;",
  1159. "1085": "ncy;",
  1160. "1086": "ocy;",
  1161. "1087": "pcy;",
  1162. "1088": "rcy;",
  1163. "1089": "scy;",
  1164. "1090": "tcy;",
  1165. "1091": "ucy;",
  1166. "1092": "fcy;",
  1167. "1093": "khcy;",
  1168. "1094": "tscy;",
  1169. "1095": "chcy;",
  1170. "1096": "shcy;",
  1171. "1097": "shchcy;",
  1172. "1098": "hardcy;",
  1173. "1099": "ycy;",
  1174. "1100": "softcy;",
  1175. "1101": "ecy;",
  1176. "1102": "yucy;",
  1177. "1103": "yacy;",
  1178. "1105": "iocy;",
  1179. "1106": "djcy;",
  1180. "1107": "gjcy;",
  1181. "1108": "jukcy;",
  1182. "1109": "dscy;",
  1183. "1110": "iukcy;",
  1184. "1111": "yicy;",
  1185. "1112": "jsercy;",
  1186. "1113": "ljcy;",
  1187. "1114": "njcy;",
  1188. "1115": "tshcy;",
  1189. "1116": "kjcy;",
  1190. "1118": "ubrcy;",
  1191. "1119": "dzcy;",
  1192. "8194": "ensp;",
  1193. "8195": "emsp;",
  1194. "8196": "emsp13;",
  1195. "8197": "emsp14;",
  1196. "8199": "numsp;",
  1197. "8200": "puncsp;",
  1198. "8201": "ThinSpace;",
  1199. "8202": "VeryThinSpace;",
  1200. "8203": "ZeroWidthSpace;",
  1201. "8204": "zwnj;",
  1202. "8205": "zwj;",
  1203. "8206": "lrm;",
  1204. "8207": "rlm;",
  1205. "8208": "hyphen;",
  1206. "8211": "ndash;",
  1207. "8212": "mdash;",
  1208. "8213": "horbar;",
  1209. "8214": "Vert;",
  1210. "8216": "OpenCurlyQuote;",
  1211. "8217": "rsquor;",
  1212. "8218": "sbquo;",
  1213. "8220": "OpenCurlyDoubleQuote;",
  1214. "8221": "rdquor;",
  1215. "8222": "ldquor;",
  1216. "8224": "dagger;",
  1217. "8225": "ddagger;",
  1218. "8226": "bullet;",
  1219. "8229": "nldr;",
  1220. "8230": "mldr;",
  1221. "8240": "permil;",
  1222. "8241": "pertenk;",
  1223. "8242": "prime;",
  1224. "8243": "Prime;",
  1225. "8244": "tprime;",
  1226. "8245": "bprime;",
  1227. "8249": "lsaquo;",
  1228. "8250": "rsaquo;",
  1229. "8254": "OverBar;",
  1230. "8257": "caret;",
  1231. "8259": "hybull;",
  1232. "8260": "frasl;",
  1233. "8271": "bsemi;",
  1234. "8279": "qprime;",
  1235. "8287": "MediumSpace;",
  1236. "8288": "NoBreak;",
  1237. "8289": "ApplyFunction;",
  1238. "8290": "it;",
  1239. "8291": "InvisibleComma;",
  1240. "8364": "euro;",
  1241. "8411": "TripleDot;",
  1242. "8412": "DotDot;",
  1243. "8450": "Copf;",
  1244. "8453": "incare;",
  1245. "8458": "gscr;",
  1246. "8459": "Hscr;",
  1247. "8460": "Poincareplane;",
  1248. "8461": "quaternions;",
  1249. "8462": "planckh;",
  1250. "8463": "plankv;",
  1251. "8464": "Iscr;",
  1252. "8465": "imagpart;",
  1253. "8466": "Lscr;",
  1254. "8467": "ell;",
  1255. "8469": "Nopf;",
  1256. "8470": "numero;",
  1257. "8471": "copysr;",
  1258. "8472": "wp;",
  1259. "8473": "primes;",
  1260. "8474": "rationals;",
  1261. "8475": "Rscr;",
  1262. "8476": "Rfr;",
  1263. "8477": "Ropf;",
  1264. "8478": "rx;",
  1265. "8482": "trade;",
  1266. "8484": "Zopf;",
  1267. "8487": "mho;",
  1268. "8488": "Zfr;",
  1269. "8489": "iiota;",
  1270. "8492": "Bscr;",
  1271. "8493": "Cfr;",
  1272. "8495": "escr;",
  1273. "8496": "expectation;",
  1274. "8497": "Fscr;",
  1275. "8499": "phmmat;",
  1276. "8500": "oscr;",
  1277. "8501": "aleph;",
  1278. "8502": "beth;",
  1279. "8503": "gimel;",
  1280. "8504": "daleth;",
  1281. "8517": "DD;",
  1282. "8518": "DifferentialD;",
  1283. "8519": "exponentiale;",
  1284. "8520": "ImaginaryI;",
  1285. "8531": "frac13;",
  1286. "8532": "frac23;",
  1287. "8533": "frac15;",
  1288. "8534": "frac25;",
  1289. "8535": "frac35;",
  1290. "8536": "frac45;",
  1291. "8537": "frac16;",
  1292. "8538": "frac56;",
  1293. "8539": "frac18;",
  1294. "8540": "frac38;",
  1295. "8541": "frac58;",
  1296. "8542": "frac78;",
  1297. "8592": "slarr;",
  1298. "8593": "uparrow;",
  1299. "8594": "srarr;",
  1300. "8595": "ShortDownArrow;",
  1301. "8596": "leftrightarrow;",
  1302. "8597": "varr;",
  1303. "8598": "UpperLeftArrow;",
  1304. "8599": "UpperRightArrow;",
  1305. "8600": "searrow;",
  1306. "8601": "swarrow;",
  1307. "8602": "nleftarrow;",
  1308. "8603": "nrightarrow;",
  1309. "8605": "rightsquigarrow;",
  1310. "8606": "twoheadleftarrow;",
  1311. "8607": "Uarr;",
  1312. "8608": "twoheadrightarrow;",
  1313. "8609": "Darr;",
  1314. "8610": "leftarrowtail;",
  1315. "8611": "rightarrowtail;",
  1316. "8612": "mapstoleft;",
  1317. "8613": "UpTeeArrow;",
  1318. "8614": "RightTeeArrow;",
  1319. "8615": "mapstodown;",
  1320. "8617": "larrhk;",
  1321. "8618": "rarrhk;",
  1322. "8619": "looparrowleft;",
  1323. "8620": "rarrlp;",
  1324. "8621": "leftrightsquigarrow;",
  1325. "8622": "nleftrightarrow;",
  1326. "8624": "lsh;",
  1327. "8625": "rsh;",
  1328. "8626": "ldsh;",
  1329. "8627": "rdsh;",
  1330. "8629": "crarr;",
  1331. "8630": "curvearrowleft;",
  1332. "8631": "curvearrowright;",
  1333. "8634": "olarr;",
  1334. "8635": "orarr;",
  1335. "8636": "lharu;",
  1336. "8637": "lhard;",
  1337. "8638": "upharpoonright;",
  1338. "8639": "upharpoonleft;",
  1339. "8640": "RightVector;",
  1340. "8641": "rightharpoondown;",
  1341. "8642": "RightDownVector;",
  1342. "8643": "LeftDownVector;",
  1343. "8644": "rlarr;",
  1344. "8645": "UpArrowDownArrow;",
  1345. "8646": "lrarr;",
  1346. "8647": "llarr;",
  1347. "8648": "uuarr;",
  1348. "8649": "rrarr;",
  1349. "8650": "downdownarrows;",
  1350. "8651": "ReverseEquilibrium;",
  1351. "8652": "rlhar;",
  1352. "8653": "nLeftarrow;",
  1353. "8654": "nLeftrightarrow;",
  1354. "8655": "nRightarrow;",
  1355. "8656": "Leftarrow;",
  1356. "8657": "Uparrow;",
  1357. "8658": "Rightarrow;",
  1358. "8659": "Downarrow;",
  1359. "8660": "Leftrightarrow;",
  1360. "8661": "vArr;",
  1361. "8662": "nwArr;",
  1362. "8663": "neArr;",
  1363. "8664": "seArr;",
  1364. "8665": "swArr;",
  1365. "8666": "Lleftarrow;",
  1366. "8667": "Rrightarrow;",
  1367. "8669": "zigrarr;",
  1368. "8676": "LeftArrowBar;",
  1369. "8677": "RightArrowBar;",
  1370. "8693": "duarr;",
  1371. "8701": "loarr;",
  1372. "8702": "roarr;",
  1373. "8703": "hoarr;",
  1374. "8704": "forall;",
  1375. "8705": "complement;",
  1376. "8706": "PartialD;",
  1377. "8707": "Exists;",
  1378. "8708": "NotExists;",
  1379. "8709": "varnothing;",
  1380. "8711": "nabla;",
  1381. "8712": "isinv;",
  1382. "8713": "notinva;",
  1383. "8715": "SuchThat;",
  1384. "8716": "NotReverseElement;",
  1385. "8719": "Product;",
  1386. "8720": "Coproduct;",
  1387. "8721": "sum;",
  1388. "8722": "minus;",
  1389. "8723": "mp;",
  1390. "8724": "plusdo;",
  1391. "8726": "ssetmn;",
  1392. "8727": "lowast;",
  1393. "8728": "SmallCircle;",
  1394. "8730": "Sqrt;",
  1395. "8733": "vprop;",
  1396. "8734": "infin;",
  1397. "8735": "angrt;",
  1398. "8736": "angle;",
  1399. "8737": "measuredangle;",
  1400. "8738": "angsph;",
  1401. "8739": "VerticalBar;",
  1402. "8740": "nsmid;",
  1403. "8741": "spar;",
  1404. "8742": "nspar;",
  1405. "8743": "wedge;",
  1406. "8744": "vee;",
  1407. "8745": "cap;",
  1408. "8746": "cup;",
  1409. "8747": "Integral;",
  1410. "8748": "Int;",
  1411. "8749": "tint;",
  1412. "8750": "oint;",
  1413. "8751": "DoubleContourIntegral;",
  1414. "8752": "Cconint;",
  1415. "8753": "cwint;",
  1416. "8754": "cwconint;",
  1417. "8755": "CounterClockwiseContourIntegral;",
  1418. "8756": "therefore;",
  1419. "8757": "because;",
  1420. "8758": "ratio;",
  1421. "8759": "Proportion;",
  1422. "8760": "minusd;",
  1423. "8762": "mDDot;",
  1424. "8763": "homtht;",
  1425. "8764": "Tilde;",
  1426. "8765": "bsim;",
  1427. "8766": "mstpos;",
  1428. "8767": "acd;",
  1429. "8768": "wreath;",
  1430. "8769": "nsim;",
  1431. "8770": "esim;",
  1432. "8771": "TildeEqual;",
  1433. "8772": "nsimeq;",
  1434. "8773": "TildeFullEqual;",
  1435. "8774": "simne;",
  1436. "8775": "NotTildeFullEqual;",
  1437. "8776": "TildeTilde;",
  1438. "8777": "NotTildeTilde;",
  1439. "8778": "approxeq;",
  1440. "8779": "apid;",
  1441. "8780": "bcong;",
  1442. "8781": "CupCap;",
  1443. "8782": "HumpDownHump;",
  1444. "8783": "HumpEqual;",
  1445. "8784": "esdot;",
  1446. "8785": "eDot;",
  1447. "8786": "fallingdotseq;",
  1448. "8787": "risingdotseq;",
  1449. "8788": "coloneq;",
  1450. "8789": "eqcolon;",
  1451. "8790": "eqcirc;",
  1452. "8791": "cire;",
  1453. "8793": "wedgeq;",
  1454. "8794": "veeeq;",
  1455. "8796": "trie;",
  1456. "8799": "questeq;",
  1457. "8800": "NotEqual;",
  1458. "8801": "equiv;",
  1459. "8802": "NotCongruent;",
  1460. "8804": "leq;",
  1461. "8805": "GreaterEqual;",
  1462. "8806": "LessFullEqual;",
  1463. "8807": "GreaterFullEqual;",
  1464. "8808": "lneqq;",
  1465. "8809": "gneqq;",
  1466. "8810": "NestedLessLess;",
  1467. "8811": "NestedGreaterGreater;",
  1468. "8812": "twixt;",
  1469. "8813": "NotCupCap;",
  1470. "8814": "NotLess;",
  1471. "8815": "NotGreater;",
  1472. "8816": "NotLessEqual;",
  1473. "8817": "NotGreaterEqual;",
  1474. "8818": "lsim;",
  1475. "8819": "gtrsim;",
  1476. "8820": "NotLessTilde;",
  1477. "8821": "NotGreaterTilde;",
  1478. "8822": "lg;",
  1479. "8823": "gtrless;",
  1480. "8824": "ntlg;",
  1481. "8825": "ntgl;",
  1482. "8826": "Precedes;",
  1483. "8827": "Succeeds;",
  1484. "8828": "PrecedesSlantEqual;",
  1485. "8829": "SucceedsSlantEqual;",
  1486. "8830": "prsim;",
  1487. "8831": "succsim;",
  1488. "8832": "nprec;",
  1489. "8833": "nsucc;",
  1490. "8834": "subset;",
  1491. "8835": "supset;",
  1492. "8836": "nsub;",
  1493. "8837": "nsup;",
  1494. "8838": "SubsetEqual;",
  1495. "8839": "supseteq;",
  1496. "8840": "nsubseteq;",
  1497. "8841": "nsupseteq;",
  1498. "8842": "subsetneq;",
  1499. "8843": "supsetneq;",
  1500. "8845": "cupdot;",
  1501. "8846": "uplus;",
  1502. "8847": "SquareSubset;",
  1503. "8848": "SquareSuperset;",
  1504. "8849": "SquareSubsetEqual;",
  1505. "8850": "SquareSupersetEqual;",
  1506. "8851": "SquareIntersection;",
  1507. "8852": "SquareUnion;",
  1508. "8853": "oplus;",
  1509. "8854": "ominus;",
  1510. "8855": "otimes;",
  1511. "8856": "osol;",
  1512. "8857": "odot;",
  1513. "8858": "ocir;",
  1514. "8859": "oast;",
  1515. "8861": "odash;",
  1516. "8862": "plusb;",
  1517. "8863": "minusb;",
  1518. "8864": "timesb;",
  1519. "8865": "sdotb;",
  1520. "8866": "vdash;",
  1521. "8867": "LeftTee;",
  1522. "8868": "top;",
  1523. "8869": "UpTee;",
  1524. "8871": "models;",
  1525. "8872": "vDash;",
  1526. "8873": "Vdash;",
  1527. "8874": "Vvdash;",
  1528. "8875": "VDash;",
  1529. "8876": "nvdash;",
  1530. "8877": "nvDash;",
  1531. "8878": "nVdash;",
  1532. "8879": "nVDash;",
  1533. "8880": "prurel;",
  1534. "8882": "vltri;",
  1535. "8883": "vrtri;",
  1536. "8884": "trianglelefteq;",
  1537. "8885": "trianglerighteq;",
  1538. "8886": "origof;",
  1539. "8887": "imof;",
  1540. "8888": "mumap;",
  1541. "8889": "hercon;",
  1542. "8890": "intercal;",
  1543. "8891": "veebar;",
  1544. "8893": "barvee;",
  1545. "8894": "angrtvb;",
  1546. "8895": "lrtri;",
  1547. "8896": "xwedge;",
  1548. "8897": "xvee;",
  1549. "8898": "xcap;",
  1550. "8899": "xcup;",
  1551. "8900": "diamond;",
  1552. "8901": "sdot;",
  1553. "8902": "Star;",
  1554. "8903": "divonx;",
  1555. "8904": "bowtie;",
  1556. "8905": "ltimes;",
  1557. "8906": "rtimes;",
  1558. "8907": "lthree;",
  1559. "8908": "rthree;",
  1560. "8909": "bsime;",
  1561. "8910": "cuvee;",
  1562. "8911": "cuwed;",
  1563. "8912": "Subset;",
  1564. "8913": "Supset;",
  1565. "8914": "Cap;",
  1566. "8915": "Cup;",
  1567. "8916": "pitchfork;",
  1568. "8917": "epar;",
  1569. "8918": "ltdot;",
  1570. "8919": "gtrdot;",
  1571. "8920": "Ll;",
  1572. "8921": "ggg;",
  1573. "8922": "LessEqualGreater;",
  1574. "8923": "gtreqless;",
  1575. "8926": "curlyeqprec;",
  1576. "8927": "curlyeqsucc;",
  1577. "8928": "nprcue;",
  1578. "8929": "nsccue;",
  1579. "8930": "nsqsube;",
  1580. "8931": "nsqsupe;",
  1581. "8934": "lnsim;",
  1582. "8935": "gnsim;",
  1583. "8936": "prnsim;",
  1584. "8937": "succnsim;",
  1585. "8938": "ntriangleleft;",
  1586. "8939": "ntriangleright;",
  1587. "8940": "ntrianglelefteq;",
  1588. "8941": "ntrianglerighteq;",
  1589. "8942": "vellip;",
  1590. "8943": "ctdot;",
  1591. "8944": "utdot;",
  1592. "8945": "dtdot;",
  1593. "8946": "disin;",
  1594. "8947": "isinsv;",
  1595. "8948": "isins;",
  1596. "8949": "isindot;",
  1597. "8950": "notinvc;",
  1598. "8951": "notinvb;",
  1599. "8953": "isinE;",
  1600. "8954": "nisd;",
  1601. "8955": "xnis;",
  1602. "8956": "nis;",
  1603. "8957": "notnivc;",
  1604. "8958": "notnivb;",
  1605. "8965": "barwedge;",
  1606. "8966": "doublebarwedge;",
  1607. "8968": "LeftCeiling;",
  1608. "8969": "RightCeiling;",
  1609. "8970": "lfloor;",
  1610. "8971": "RightFloor;",
  1611. "8972": "drcrop;",
  1612. "8973": "dlcrop;",
  1613. "8974": "urcrop;",
  1614. "8975": "ulcrop;",
  1615. "8976": "bnot;",
  1616. "8978": "profline;",
  1617. "8979": "profsurf;",
  1618. "8981": "telrec;",
  1619. "8982": "target;",
  1620. "8988": "ulcorner;",
  1621. "8989": "urcorner;",
  1622. "8990": "llcorner;",
  1623. "8991": "lrcorner;",
  1624. "8994": "sfrown;",
  1625. "8995": "ssmile;",
  1626. "9005": "cylcty;",
  1627. "9006": "profalar;",
  1628. "9014": "topbot;",
  1629. "9021": "ovbar;",
  1630. "9023": "solbar;",
  1631. "9084": "angzarr;",
  1632. "9136": "lmoustache;",
  1633. "9137": "rmoustache;",
  1634. "9140": "tbrk;",
  1635. "9141": "UnderBracket;",
  1636. "9142": "bbrktbrk;",
  1637. "9180": "OverParenthesis;",
  1638. "9181": "UnderParenthesis;",
  1639. "9182": "OverBrace;",
  1640. "9183": "UnderBrace;",
  1641. "9186": "trpezium;",
  1642. "9191": "elinters;",
  1643. "9251": "blank;",
  1644. "9416": "oS;",
  1645. "9472": "HorizontalLine;",
  1646. "9474": "boxv;",
  1647. "9484": "boxdr;",
  1648. "9488": "boxdl;",
  1649. "9492": "boxur;",
  1650. "9496": "boxul;",
  1651. "9500": "boxvr;",
  1652. "9508": "boxvl;",
  1653. "9516": "boxhd;",
  1654. "9524": "boxhu;",
  1655. "9532": "boxvh;",
  1656. "9552": "boxH;",
  1657. "9553": "boxV;",
  1658. "9554": "boxdR;",
  1659. "9555": "boxDr;",
  1660. "9556": "boxDR;",
  1661. "9557": "boxdL;",
  1662. "9558": "boxDl;",
  1663. "9559": "boxDL;",
  1664. "9560": "boxuR;",
  1665. "9561": "boxUr;",
  1666. "9562": "boxUR;",
  1667. "9563": "boxuL;",
  1668. "9564": "boxUl;",
  1669. "9565": "boxUL;",
  1670. "9566": "boxvR;",
  1671. "9567": "boxVr;",
  1672. "9568": "boxVR;",
  1673. "9569": "boxvL;",
  1674. "9570": "boxVl;",
  1675. "9571": "boxVL;",
  1676. "9572": "boxHd;",
  1677. "9573": "boxhD;",
  1678. "9574": "boxHD;",
  1679. "9575": "boxHu;",
  1680. "9576": "boxhU;",
  1681. "9577": "boxHU;",
  1682. "9578": "boxvH;",
  1683. "9579": "boxVh;",
  1684. "9580": "boxVH;",
  1685. "9600": "uhblk;",
  1686. "9604": "lhblk;",
  1687. "9608": "block;",
  1688. "9617": "blk14;",
  1689. "9618": "blk12;",
  1690. "9619": "blk34;",
  1691. "9633": "square;",
  1692. "9642": "squf;",
  1693. "9643": "EmptyVerySmallSquare;",
  1694. "9645": "rect;",
  1695. "9646": "marker;",
  1696. "9649": "fltns;",
  1697. "9651": "xutri;",
  1698. "9652": "utrif;",
  1699. "9653": "utri;",
  1700. "9656": "rtrif;",
  1701. "9657": "triangleright;",
  1702. "9661": "xdtri;",
  1703. "9662": "dtrif;",
  1704. "9663": "triangledown;",
  1705. "9666": "ltrif;",
  1706. "9667": "triangleleft;",
  1707. "9674": "lozenge;",
  1708. "9675": "cir;",
  1709. "9708": "tridot;",
  1710. "9711": "xcirc;",
  1711. "9720": "ultri;",
  1712. "9721": "urtri;",
  1713. "9722": "lltri;",
  1714. "9723": "EmptySmallSquare;",
  1715. "9724": "FilledSmallSquare;",
  1716. "9733": "starf;",
  1717. "9734": "star;",
  1718. "9742": "phone;",
  1719. "9792": "female;",
  1720. "9794": "male;",
  1721. "9824": "spadesuit;",
  1722. "9827": "clubsuit;",
  1723. "9829": "heartsuit;",
  1724. "9830": "diams;",
  1725. "9834": "sung;",
  1726. "9837": "flat;",
  1727. "9838": "natural;",
  1728. "9839": "sharp;",
  1729. "10003": "checkmark;",
  1730. "10007": "cross;",
  1731. "10016": "maltese;",
  1732. "10038": "sext;",
  1733. "10072": "VerticalSeparator;",
  1734. "10098": "lbbrk;",
  1735. "10099": "rbbrk;",
  1736. "10184": "bsolhsub;",
  1737. "10185": "suphsol;",
  1738. "10214": "lobrk;",
  1739. "10215": "robrk;",
  1740. "10216": "LeftAngleBracket;",
  1741. "10217": "RightAngleBracket;",
  1742. "10218": "Lang;",
  1743. "10219": "Rang;",
  1744. "10220": "loang;",
  1745. "10221": "roang;",
  1746. "10229": "xlarr;",
  1747. "10230": "xrarr;",
  1748. "10231": "xharr;",
  1749. "10232": "xlArr;",
  1750. "10233": "xrArr;",
  1751. "10234": "xhArr;",
  1752. "10236": "xmap;",
  1753. "10239": "dzigrarr;",
  1754. "10498": "nvlArr;",
  1755. "10499": "nvrArr;",
  1756. "10500": "nvHarr;",
  1757. "10501": "Map;",
  1758. "10508": "lbarr;",
  1759. "10509": "rbarr;",
  1760. "10510": "lBarr;",
  1761. "10511": "rBarr;",
  1762. "10512": "RBarr;",
  1763. "10513": "DDotrahd;",
  1764. "10514": "UpArrowBar;",
  1765. "10515": "DownArrowBar;",
  1766. "10518": "Rarrtl;",
  1767. "10521": "latail;",
  1768. "10522": "ratail;",
  1769. "10523": "lAtail;",
  1770. "10524": "rAtail;",
  1771. "10525": "larrfs;",
  1772. "10526": "rarrfs;",
  1773. "10527": "larrbfs;",
  1774. "10528": "rarrbfs;",
  1775. "10531": "nwarhk;",
  1776. "10532": "nearhk;",
  1777. "10533": "searhk;",
  1778. "10534": "swarhk;",
  1779. "10535": "nwnear;",
  1780. "10536": "toea;",
  1781. "10537": "tosa;",
  1782. "10538": "swnwar;",
  1783. "10547": "rarrc;",
  1784. "10549": "cudarrr;",
  1785. "10550": "ldca;",
  1786. "10551": "rdca;",
  1787. "10552": "cudarrl;",
  1788. "10553": "larrpl;",
  1789. "10556": "curarrm;",
  1790. "10557": "cularrp;",
  1791. "10565": "rarrpl;",
  1792. "10568": "harrcir;",
  1793. "10569": "Uarrocir;",
  1794. "10570": "lurdshar;",
  1795. "10571": "ldrushar;",
  1796. "10574": "LeftRightVector;",
  1797. "10575": "RightUpDownVector;",
  1798. "10576": "DownLeftRightVector;",
  1799. "10577": "LeftUpDownVector;",
  1800. "10578": "LeftVectorBar;",
  1801. "10579": "RightVectorBar;",
  1802. "10580": "RightUpVectorBar;",
  1803. "10581": "RightDownVectorBar;",
  1804. "10582": "DownLeftVectorBar;",
  1805. "10583": "DownRightVectorBar;",
  1806. "10584": "LeftUpVectorBar;",
  1807. "10585": "LeftDownVectorBar;",
  1808. "10586": "LeftTeeVector;",
  1809. "10587": "RightTeeVector;",
  1810. "10588": "RightUpTeeVector;",
  1811. "10589": "RightDownTeeVector;",
  1812. "10590": "DownLeftTeeVector;",
  1813. "10591": "DownRightTeeVector;",
  1814. "10592": "LeftUpTeeVector;",
  1815. "10593": "LeftDownTeeVector;",
  1816. "10594": "lHar;",
  1817. "10595": "uHar;",
  1818. "10596": "rHar;",
  1819. "10597": "dHar;",
  1820. "10598": "luruhar;",
  1821. "10599": "ldrdhar;",
  1822. "10600": "ruluhar;",
  1823. "10601": "rdldhar;",
  1824. "10602": "lharul;",
  1825. "10603": "llhard;",
  1826. "10604": "rharul;",
  1827. "10605": "lrhard;",
  1828. "10606": "UpEquilibrium;",
  1829. "10607": "ReverseUpEquilibrium;",
  1830. "10608": "RoundImplies;",
  1831. "10609": "erarr;",
  1832. "10610": "simrarr;",
  1833. "10611": "larrsim;",
  1834. "10612": "rarrsim;",
  1835. "10613": "rarrap;",
  1836. "10614": "ltlarr;",
  1837. "10616": "gtrarr;",
  1838. "10617": "subrarr;",
  1839. "10619": "suplarr;",
  1840. "10620": "lfisht;",
  1841. "10621": "rfisht;",
  1842. "10622": "ufisht;",
  1843. "10623": "dfisht;",
  1844. "10629": "lopar;",
  1845. "10630": "ropar;",
  1846. "10635": "lbrke;",
  1847. "10636": "rbrke;",
  1848. "10637": "lbrkslu;",
  1849. "10638": "rbrksld;",
  1850. "10639": "lbrksld;",
  1851. "10640": "rbrkslu;",
  1852. "10641": "langd;",
  1853. "10642": "rangd;",
  1854. "10643": "lparlt;",
  1855. "10644": "rpargt;",
  1856. "10645": "gtlPar;",
  1857. "10646": "ltrPar;",
  1858. "10650": "vzigzag;",
  1859. "10652": "vangrt;",
  1860. "10653": "angrtvbd;",
  1861. "10660": "ange;",
  1862. "10661": "range;",
  1863. "10662": "dwangle;",
  1864. "10663": "uwangle;",
  1865. "10664": "angmsdaa;",
  1866. "10665": "angmsdab;",
  1867. "10666": "angmsdac;",
  1868. "10667": "angmsdad;",
  1869. "10668": "angmsdae;",
  1870. "10669": "angmsdaf;",
  1871. "10670": "angmsdag;",
  1872. "10671": "angmsdah;",
  1873. "10672": "bemptyv;",
  1874. "10673": "demptyv;",
  1875. "10674": "cemptyv;",
  1876. "10675": "raemptyv;",
  1877. "10676": "laemptyv;",
  1878. "10677": "ohbar;",
  1879. "10678": "omid;",
  1880. "10679": "opar;",
  1881. "10681": "operp;",
  1882. "10683": "olcross;",
  1883. "10684": "odsold;",
  1884. "10686": "olcir;",
  1885. "10687": "ofcir;",
  1886. "10688": "olt;",
  1887. "10689": "ogt;",
  1888. "10690": "cirscir;",
  1889. "10691": "cirE;",
  1890. "10692": "solb;",
  1891. "10693": "bsolb;",
  1892. "10697": "boxbox;",
  1893. "10701": "trisb;",
  1894. "10702": "rtriltri;",
  1895. "10703": "LeftTriangleBar;",
  1896. "10704": "RightTriangleBar;",
  1897. "10716": "iinfin;",
  1898. "10717": "infintie;",
  1899. "10718": "nvinfin;",
  1900. "10723": "eparsl;",
  1901. "10724": "smeparsl;",
  1902. "10725": "eqvparsl;",
  1903. "10731": "lozf;",
  1904. "10740": "RuleDelayed;",
  1905. "10742": "dsol;",
  1906. "10752": "xodot;",
  1907. "10753": "xoplus;",
  1908. "10754": "xotime;",
  1909. "10756": "xuplus;",
  1910. "10758": "xsqcup;",
  1911. "10764": "qint;",
  1912. "10765": "fpartint;",
  1913. "10768": "cirfnint;",
  1914. "10769": "awint;",
  1915. "10770": "rppolint;",
  1916. "10771": "scpolint;",
  1917. "10772": "npolint;",
  1918. "10773": "pointint;",
  1919. "10774": "quatint;",
  1920. "10775": "intlarhk;",
  1921. "10786": "pluscir;",
  1922. "10787": "plusacir;",
  1923. "10788": "simplus;",
  1924. "10789": "plusdu;",
  1925. "10790": "plussim;",
  1926. "10791": "plustwo;",
  1927. "10793": "mcomma;",
  1928. "10794": "minusdu;",
  1929. "10797": "loplus;",
  1930. "10798": "roplus;",
  1931. "10799": "Cross;",
  1932. "10800": "timesd;",
  1933. "10801": "timesbar;",
  1934. "10803": "smashp;",
  1935. "10804": "lotimes;",
  1936. "10805": "rotimes;",
  1937. "10806": "otimesas;",
  1938. "10807": "Otimes;",
  1939. "10808": "odiv;",
  1940. "10809": "triplus;",
  1941. "10810": "triminus;",
  1942. "10811": "tritime;",
  1943. "10812": "iprod;",
  1944. "10815": "amalg;",
  1945. "10816": "capdot;",
  1946. "10818": "ncup;",
  1947. "10819": "ncap;",
  1948. "10820": "capand;",
  1949. "10821": "cupor;",
  1950. "10822": "cupcap;",
  1951. "10823": "capcup;",
  1952. "10824": "cupbrcap;",
  1953. "10825": "capbrcup;",
  1954. "10826": "cupcup;",
  1955. "10827": "capcap;",
  1956. "10828": "ccups;",
  1957. "10829": "ccaps;",
  1958. "10832": "ccupssm;",
  1959. "10835": "And;",
  1960. "10836": "Or;",
  1961. "10837": "andand;",
  1962. "10838": "oror;",
  1963. "10839": "orslope;",
  1964. "10840": "andslope;",
  1965. "10842": "andv;",
  1966. "10843": "orv;",
  1967. "10844": "andd;",
  1968. "10845": "ord;",
  1969. "10847": "wedbar;",
  1970. "10854": "sdote;",
  1971. "10858": "simdot;",
  1972. "10861": "congdot;",
  1973. "10862": "easter;",
  1974. "10863": "apacir;",
  1975. "10864": "apE;",
  1976. "10865": "eplus;",
  1977. "10866": "pluse;",
  1978. "10867": "Esim;",
  1979. "10868": "Colone;",
  1980. "10869": "Equal;",
  1981. "10871": "eDDot;",
  1982. "10872": "equivDD;",
  1983. "10873": "ltcir;",
  1984. "10874": "gtcir;",
  1985. "10875": "ltquest;",
  1986. "10876": "gtquest;",
  1987. "10877": "LessSlantEqual;",
  1988. "10878": "GreaterSlantEqual;",
  1989. "10879": "lesdot;",
  1990. "10880": "gesdot;",
  1991. "10881": "lesdoto;",
  1992. "10882": "gesdoto;",
  1993. "10883": "lesdotor;",
  1994. "10884": "gesdotol;",
  1995. "10885": "lessapprox;",
  1996. "10886": "gtrapprox;",
  1997. "10887": "lneq;",
  1998. "10888": "gneq;",
  1999. "10889": "lnapprox;",
  2000. "10890": "gnapprox;",
  2001. "10891": "lesseqqgtr;",
  2002. "10892": "gtreqqless;",
  2003. "10893": "lsime;",
  2004. "10894": "gsime;",
  2005. "10895": "lsimg;",
  2006. "10896": "gsiml;",
  2007. "10897": "lgE;",
  2008. "10898": "glE;",
  2009. "10899": "lesges;",
  2010. "10900": "gesles;",
  2011. "10901": "eqslantless;",
  2012. "10902": "eqslantgtr;",
  2013. "10903": "elsdot;",
  2014. "10904": "egsdot;",
  2015. "10905": "el;",
  2016. "10906": "eg;",
  2017. "10909": "siml;",
  2018. "10910": "simg;",
  2019. "10911": "simlE;",
  2020. "10912": "simgE;",
  2021. "10913": "LessLess;",
  2022. "10914": "GreaterGreater;",
  2023. "10916": "glj;",
  2024. "10917": "gla;",
  2025. "10918": "ltcc;",
  2026. "10919": "gtcc;",
  2027. "10920": "lescc;",
  2028. "10921": "gescc;",
  2029. "10922": "smt;",
  2030. "10923": "lat;",
  2031. "10924": "smte;",
  2032. "10925": "late;",
  2033. "10926": "bumpE;",
  2034. "10927": "preceq;",
  2035. "10928": "succeq;",
  2036. "10931": "prE;",
  2037. "10932": "scE;",
  2038. "10933": "prnE;",
  2039. "10934": "succneqq;",
  2040. "10935": "precapprox;",
  2041. "10936": "succapprox;",
  2042. "10937": "prnap;",
  2043. "10938": "succnapprox;",
  2044. "10939": "Pr;",
  2045. "10940": "Sc;",
  2046. "10941": "subdot;",
  2047. "10942": "supdot;",
  2048. "10943": "subplus;",
  2049. "10944": "supplus;",
  2050. "10945": "submult;",
  2051. "10946": "supmult;",
  2052. "10947": "subedot;",
  2053. "10948": "supedot;",
  2054. "10949": "subseteqq;",
  2055. "10950": "supseteqq;",
  2056. "10951": "subsim;",
  2057. "10952": "supsim;",
  2058. "10955": "subsetneqq;",
  2059. "10956": "supsetneqq;",
  2060. "10959": "csub;",
  2061. "10960": "csup;",
  2062. "10961": "csube;",
  2063. "10962": "csupe;",
  2064. "10963": "subsup;",
  2065. "10964": "supsub;",
  2066. "10965": "subsub;",
  2067. "10966": "supsup;",
  2068. "10967": "suphsub;",
  2069. "10968": "supdsub;",
  2070. "10969": "forkv;",
  2071. "10970": "topfork;",
  2072. "10971": "mlcp;",
  2073. "10980": "DoubleLeftTee;",
  2074. "10982": "Vdashl;",
  2075. "10983": "Barv;",
  2076. "10984": "vBar;",
  2077. "10985": "vBarv;",
  2078. "10987": "Vbar;",
  2079. "10988": "Not;",
  2080. "10989": "bNot;",
  2081. "10990": "rnmid;",
  2082. "10991": "cirmid;",
  2083. "10992": "midcir;",
  2084. "10993": "topcir;",
  2085. "10994": "nhpar;",
  2086. "10995": "parsim;",
  2087. "11005": "parsl;",
  2088. "64256": "fflig;",
  2089. "64257": "filig;",
  2090. "64258": "fllig;",
  2091. "64259": "ffilig;",
  2092. "64260": "ffllig;"
  2093. }
  2094. },{}],11:[function(require,module,exports){
  2095. 'use strict';
  2096. var hasOwn = Object.prototype.hasOwnProperty;
  2097. var toStr = Object.prototype.toString;
  2098. var defineProperty = Object.defineProperty;
  2099. var gOPD = Object.getOwnPropertyDescriptor;
  2100. var isArray = function isArray(arr) {
  2101. if (typeof Array.isArray === 'function') {
  2102. return Array.isArray(arr);
  2103. }
  2104. return toStr.call(arr) === '[object Array]';
  2105. };
  2106. var isPlainObject = function isPlainObject(obj) {
  2107. if (!obj || toStr.call(obj) !== '[object Object]') {
  2108. return false;
  2109. }
  2110. var hasOwnConstructor = hasOwn.call(obj, 'constructor');
  2111. var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, 'isPrototypeOf');
  2112. // Not own constructor property must be Object
  2113. if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {
  2114. return false;
  2115. }
  2116. // Own properties are enumerated firstly, so to speed up,
  2117. // if last one is own, then all properties are own.
  2118. var key;
  2119. for (key in obj) { /**/ }
  2120. return typeof key === 'undefined' || hasOwn.call(obj, key);
  2121. };
  2122. // If name is '__proto__', and Object.defineProperty is available, define __proto__ as an own property on target
  2123. var setProperty = function setProperty(target, options) {
  2124. if (defineProperty && options.name === '__proto__') {
  2125. defineProperty(target, options.name, {
  2126. enumerable: true,
  2127. configurable: true,
  2128. value: options.newValue,
  2129. writable: true
  2130. });
  2131. } else {
  2132. target[options.name] = options.newValue;
  2133. }
  2134. };
  2135. // Return undefined instead of __proto__ if '__proto__' is not an own property
  2136. var getProperty = function getProperty(obj, name) {
  2137. if (name === '__proto__') {
  2138. if (!hasOwn.call(obj, name)) {
  2139. return void 0;
  2140. } else if (gOPD) {
  2141. // In early versions of node, obj['__proto__'] is buggy when obj has
  2142. // __proto__ as an own property. Object.getOwnPropertyDescriptor() works.
  2143. return gOPD(obj, name).value;
  2144. }
  2145. }
  2146. return obj[name];
  2147. };
  2148. module.exports = function extend() {
  2149. var options, name, src, copy, copyIsArray, clone;
  2150. var target = arguments[0];
  2151. var i = 1;
  2152. var length = arguments.length;
  2153. var deep = false;
  2154. // Handle a deep copy situation
  2155. if (typeof target === 'boolean') {
  2156. deep = target;
  2157. target = arguments[1] || {};
  2158. // skip the boolean and the target
  2159. i = 2;
  2160. }
  2161. if (target == null || (typeof target !== 'object' && typeof target !== 'function')) {
  2162. target = {};
  2163. }
  2164. for (; i < length; ++i) {
  2165. options = arguments[i];
  2166. // Only deal with non-null/undefined values
  2167. if (options != null) {
  2168. // Extend the base object
  2169. for (name in options) {
  2170. src = getProperty(target, name);
  2171. copy = getProperty(options, name);
  2172. // Prevent never-ending loop
  2173. if (target !== copy) {
  2174. // Recurse if we're merging plain objects or arrays
  2175. if (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {
  2176. if (copyIsArray) {
  2177. copyIsArray = false;
  2178. clone = src && isArray(src) ? src : [];
  2179. } else {
  2180. clone = src && isPlainObject(src) ? src : {};
  2181. }
  2182. // Never move original objects, clone them
  2183. setProperty(target, { name: name, newValue: extend(deep, clone, copy) });
  2184. // Don't bring in undefined values
  2185. } else if (typeof copy !== 'undefined') {
  2186. setProperty(target, { name: name, newValue: copy });
  2187. }
  2188. }
  2189. }
  2190. }
  2191. }
  2192. // Return the modified object
  2193. return target;
  2194. };
  2195. },{}],12:[function(require,module,exports){
  2196. (function (global){
  2197. /*! https://mths.be/punycode v1.4.1 by @mathias */
  2198. ;(function(root) {
  2199. /** Detect free variables */
  2200. var freeExports = typeof exports == 'object' && exports &&
  2201. !exports.nodeType && exports;
  2202. var freeModule = typeof module == 'object' && module &&
  2203. !module.nodeType && module;
  2204. var freeGlobal = typeof global == 'object' && global;
  2205. if (
  2206. freeGlobal.global === freeGlobal ||
  2207. freeGlobal.window === freeGlobal ||
  2208. freeGlobal.self === freeGlobal
  2209. ) {
  2210. root = freeGlobal;
  2211. }
  2212. /**
  2213. * The `punycode` object.
  2214. * @name punycode
  2215. * @type Object
  2216. */
  2217. var punycode,
  2218. /** Highest positive signed 32-bit float value */
  2219. maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1
  2220. /** Bootstring parameters */
  2221. base = 36,
  2222. tMin = 1,
  2223. tMax = 26,
  2224. skew = 38,
  2225. damp = 700,
  2226. initialBias = 72,
  2227. initialN = 128, // 0x80
  2228. delimiter = '-', // '\x2D'
  2229. /** Regular expressions */
  2230. regexPunycode = /^xn--/,
  2231. regexNonASCII = /[^\x20-\x7E]/, // unprintable ASCII chars + non-ASCII chars
  2232. regexSeparators = /[\x2E\u3002\uFF0E\uFF61]/g, // RFC 3490 separators
  2233. /** Error messages */
  2234. errors = {
  2235. 'overflow': 'Overflow: input needs wider integers to process',
  2236. 'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
  2237. 'invalid-input': 'Invalid input'
  2238. },
  2239. /** Convenience shortcuts */
  2240. baseMinusTMin = base - tMin,
  2241. floor = Math.floor,
  2242. stringFromCharCode = String.fromCharCode,
  2243. /** Temporary variable */
  2244. key;
  2245. /*--------------------------------------------------------------------------*/
  2246. /**
  2247. * A generic error utility function.
  2248. * @private
  2249. * @param {String} type The error type.
  2250. * @returns {Error} Throws a `RangeError` with the applicable error message.
  2251. */
  2252. function error(type) {
  2253. throw new RangeError(errors[type]);
  2254. }
  2255. /**
  2256. * A generic `Array#map` utility function.
  2257. * @private
  2258. * @param {Array} array The array to iterate over.
  2259. * @param {Function} callback The function that gets called for every array
  2260. * item.
  2261. * @returns {Array} A new array of values returned by the callback function.
  2262. */
  2263. function map(array, fn) {
  2264. var length = array.length;
  2265. var result = [];
  2266. while (length--) {
  2267. result[length] = fn(array[length]);
  2268. }
  2269. return result;
  2270. }
  2271. /**
  2272. * A simple `Array#map`-like wrapper to work with domain name strings or email
  2273. * addresses.
  2274. * @private
  2275. * @param {String} domain The domain name or email address.
  2276. * @param {Function} callback The function that gets called for every
  2277. * character.
  2278. * @returns {Array} A new string of characters returned by the callback
  2279. * function.
  2280. */
  2281. function mapDomain(string, fn) {
  2282. var parts = string.split('@');
  2283. var result = '';
  2284. if (parts.length > 1) {
  2285. // In email addresses, only the domain name should be punycoded. Leave
  2286. // the local part (i.e. everything up to `@`) intact.
  2287. result = parts[0] + '@';
  2288. string = parts[1];
  2289. }
  2290. // Avoid `split(regex)` for IE8 compatibility. See #17.
  2291. string = string.replace(regexSeparators, '\x2E');
  2292. var labels = string.split('.');
  2293. var encoded = map(labels, fn).join('.');
  2294. return result + encoded;
  2295. }
  2296. /**
  2297. * Creates an array containing the numeric code points of each Unicode
  2298. * character in the string. While JavaScript uses UCS-2 internally,
  2299. * this function will convert a pair of surrogate halves (each of which
  2300. * UCS-2 exposes as separate characters) into a single code point,
  2301. * matching UTF-16.
  2302. * @see `punycode.ucs2.encode`
  2303. * @see <https://mathiasbynens.be/notes/javascript-encoding>
  2304. * @memberOf punycode.ucs2
  2305. * @name decode
  2306. * @param {String} string The Unicode input string (UCS-2).
  2307. * @returns {Array} The new array of code points.
  2308. */
  2309. function ucs2decode(string) {
  2310. var output = [],
  2311. counter = 0,
  2312. length = string.length,
  2313. value,
  2314. extra;
  2315. while (counter < length) {
  2316. value = string.charCodeAt(counter++);
  2317. if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
  2318. // high surrogate, and there is a next character
  2319. extra = string.charCodeAt(counter++);
  2320. if ((extra & 0xFC00) == 0xDC00) { // low surrogate
  2321. output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
  2322. } else {
  2323. // unmatched surrogate; only append this code unit, in case the next
  2324. // code unit is the high surrogate of a surrogate pair
  2325. output.push(value);
  2326. counter--;
  2327. }
  2328. } else {
  2329. output.push(value);
  2330. }
  2331. }
  2332. return output;
  2333. }
  2334. /**
  2335. * Creates a string based on an array of numeric code points.
  2336. * @see `punycode.ucs2.decode`
  2337. * @memberOf punycode.ucs2
  2338. * @name encode
  2339. * @param {Array} codePoints The array of numeric code points.
  2340. * @returns {String} The new Unicode string (UCS-2).
  2341. */
  2342. function ucs2encode(array) {
  2343. return map(array, function(value) {
  2344. var output = '';
  2345. if (value > 0xFFFF) {
  2346. value -= 0x10000;
  2347. output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);
  2348. value = 0xDC00 | value & 0x3FF;
  2349. }
  2350. output += stringFromCharCode(value);
  2351. return output;
  2352. }).join('');
  2353. }
  2354. /**
  2355. * Converts a basic code point into a digit/integer.
  2356. * @see `digitToBasic()`
  2357. * @private
  2358. * @param {Number} codePoint The basic numeric code point value.
  2359. * @returns {Number} The numeric value of a basic code point (for use in
  2360. * representing integers) in the range `0` to `base - 1`, or `base` if
  2361. * the code point does not represent a value.
  2362. */
  2363. function basicToDigit(codePoint) {
  2364. if (codePoint - 48 < 10) {
  2365. return codePoint - 22;
  2366. }
  2367. if (codePoint - 65 < 26) {
  2368. return codePoint - 65;
  2369. }
  2370. if (codePoint - 97 < 26) {
  2371. return codePoint - 97;
  2372. }
  2373. return base;
  2374. }
  2375. /**
  2376. * Converts a digit/integer into a basic code point.
  2377. * @see `basicToDigit()`
  2378. * @private
  2379. * @param {Number} digit The numeric value of a basic code point.
  2380. * @returns {Number} The basic code point whose value (when used for
  2381. * representing integers) is `digit`, which needs to be in the range
  2382. * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
  2383. * used; else, the lowercase form is used. The behavior is undefined
  2384. * if `flag` is non-zero and `digit` has no uppercase form.
  2385. */
  2386. function digitToBasic(digit, flag) {
  2387. // 0..25 map to ASCII a..z or A..Z
  2388. // 26..35 map to ASCII 0..9
  2389. return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
  2390. }
  2391. /**
  2392. * Bias adaptation function as per section 3.4 of RFC 3492.
  2393. * https://tools.ietf.org/html/rfc3492#section-3.4
  2394. * @private
  2395. */
  2396. function adapt(delta, numPoints, firstTime) {
  2397. var k = 0;
  2398. delta = firstTime ? floor(delta / damp) : delta >> 1;
  2399. delta += floor(delta / numPoints);
  2400. for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {
  2401. delta = floor(delta / baseMinusTMin);
  2402. }
  2403. return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
  2404. }
  2405. /**
  2406. * Converts a Punycode string of ASCII-only symbols to a string of Unicode
  2407. * symbols.
  2408. * @memberOf punycode
  2409. * @param {String} input The Punycode string of ASCII-only symbols.
  2410. * @returns {String} The resulting string of Unicode symbols.
  2411. */
  2412. function decode(input) {
  2413. // Don't use UCS-2
  2414. var output = [],
  2415. inputLength = input.length,
  2416. out,
  2417. i = 0,
  2418. n = initialN,
  2419. bias = initialBias,
  2420. basic,
  2421. j,
  2422. index,
  2423. oldi,
  2424. w,
  2425. k,
  2426. digit,
  2427. t,
  2428. /** Cached calculation results */
  2429. baseMinusT;
  2430. // Handle the basic code points: let `basic` be the number of input code
  2431. // points before the last delimiter, or `0` if there is none, then copy
  2432. // the first basic code points to the output.
  2433. basic = input.lastIndexOf(delimiter);
  2434. if (basic < 0) {
  2435. basic = 0;
  2436. }
  2437. for (j = 0; j < basic; ++j) {
  2438. // if it's not a basic code point
  2439. if (input.charCodeAt(j) >= 0x80) {
  2440. error('not-basic');
  2441. }
  2442. output.push(input.charCodeAt(j));
  2443. }
  2444. // Main decoding loop: start just after the last delimiter if any basic code
  2445. // points were copied; start at the beginning otherwise.
  2446. for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {
  2447. // `index` is the index of the next character to be consumed.
  2448. // Decode a generalized variable-length integer into `delta`,
  2449. // which gets added to `i`. The overflow checking is easier
  2450. // if we increase `i` as we go, then subtract off its starting
  2451. // value at the end to obtain `delta`.
  2452. for (oldi = i, w = 1, k = base; /* no condition */; k += base) {
  2453. if (index >= inputLength) {
  2454. error('invalid-input');
  2455. }
  2456. digit = basicToDigit(input.charCodeAt(index++));
  2457. if (digit >= base || digit > floor((maxInt - i) / w)) {
  2458. error('overflow');
  2459. }
  2460. i += digit * w;
  2461. t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
  2462. if (digit < t) {
  2463. break;
  2464. }
  2465. baseMinusT = base - t;
  2466. if (w > floor(maxInt / baseMinusT)) {
  2467. error('overflow');
  2468. }
  2469. w *= baseMinusT;
  2470. }
  2471. out = output.length + 1;
  2472. bias = adapt(i - oldi, out, oldi == 0);
  2473. // `i` was supposed to wrap around from `out` to `0`,
  2474. // incrementing `n` each time, so we'll fix that now:
  2475. if (floor(i / out) > maxInt - n) {
  2476. error('overflow');
  2477. }
  2478. n += floor(i / out);
  2479. i %= out;
  2480. // Insert `n` at position `i` of the output
  2481. output.splice(i++, 0, n);
  2482. }
  2483. return ucs2encode(output);
  2484. }
  2485. /**
  2486. * Converts a string of Unicode symbols (e.g. a domain name label) to a
  2487. * Punycode string of ASCII-only symbols.
  2488. * @memberOf punycode
  2489. * @param {String} input The string of Unicode symbols.
  2490. * @returns {String} The resulting Punycode string of ASCII-only symbols.
  2491. */
  2492. function encode(input) {
  2493. var n,
  2494. delta,
  2495. handledCPCount,
  2496. basicLength,
  2497. bias,
  2498. j,
  2499. m,
  2500. q,
  2501. k,
  2502. t,
  2503. currentValue,
  2504. output = [],
  2505. /** `inputLength` will hold the number of code points in `input`. */
  2506. inputLength,
  2507. /** Cached calculation results */
  2508. handledCPCountPlusOne,
  2509. baseMinusT,
  2510. qMinusT;
  2511. // Convert the input in UCS-2 to Unicode
  2512. input = ucs2decode(input);
  2513. // Cache the length
  2514. inputLength = input.length;
  2515. // Initialize the state
  2516. n = initialN;
  2517. delta = 0;
  2518. bias = initialBias;
  2519. // Handle the basic code points
  2520. for (j = 0; j < inputLength; ++j) {
  2521. currentValue = input[j];
  2522. if (currentValue < 0x80) {
  2523. output.push(stringFromCharCode(currentValue));
  2524. }
  2525. }
  2526. handledCPCount = basicLength = output.length;
  2527. // `handledCPCount` is the number of code points that have been handled;
  2528. // `basicLength` is the number of basic code points.
  2529. // Finish the basic string - if it is not empty - with a delimiter
  2530. if (basicLength) {
  2531. output.push(delimiter);
  2532. }
  2533. // Main encoding loop:
  2534. while (handledCPCount < inputLength) {
  2535. // All non-basic code points < n have been handled already. Find the next
  2536. // larger one:
  2537. for (m = maxInt, j = 0; j < inputLength; ++j) {
  2538. currentValue = input[j];
  2539. if (currentValue >= n && currentValue < m) {
  2540. m = currentValue;
  2541. }
  2542. }
  2543. // Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
  2544. // but guard against overflow
  2545. handledCPCountPlusOne = handledCPCount + 1;
  2546. if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
  2547. error('overflow');
  2548. }
  2549. delta += (m - n) * handledCPCountPlusOne;
  2550. n = m;
  2551. for (j = 0; j < inputLength; ++j) {
  2552. currentValue = input[j];
  2553. if (currentValue < n && ++delta > maxInt) {
  2554. error('overflow');
  2555. }
  2556. if (currentValue == n) {
  2557. // Represent delta as a generalized variable-length integer
  2558. for (q = delta, k = base; /* no condition */; k += base) {
  2559. t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
  2560. if (q < t) {
  2561. break;
  2562. }
  2563. qMinusT = q - t;
  2564. baseMinusT = base - t;
  2565. output.push(
  2566. stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))
  2567. );
  2568. q = floor(qMinusT / baseMinusT);
  2569. }
  2570. output.push(stringFromCharCode(digitToBasic(q, 0)));
  2571. bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
  2572. delta = 0;
  2573. ++handledCPCount;
  2574. }
  2575. }
  2576. ++delta;
  2577. ++n;
  2578. }
  2579. return output.join('');
  2580. }
  2581. /**
  2582. * Converts a Punycode string representing a domain name or an email address
  2583. * to Unicode. Only the Punycoded parts of the input will be converted, i.e.
  2584. * it doesn't matter if you call it on a string that has already been
  2585. * converted to Unicode.
  2586. * @memberOf punycode
  2587. * @param {String} input The Punycoded domain name or email address to
  2588. * convert to Unicode.
  2589. * @returns {String} The Unicode representation of the given Punycode
  2590. * string.
  2591. */
  2592. function toUnicode(input) {
  2593. return mapDomain(input, function(string) {
  2594. return regexPunycode.test(string)
  2595. ? decode(string.slice(4).toLowerCase())
  2596. : string;
  2597. });
  2598. }
  2599. /**
  2600. * Converts a Unicode string representing a domain name or an email address to
  2601. * Punycode. Only the non-ASCII parts of the domain name will be converted,
  2602. * i.e. it doesn't matter if you call it with a domain that's already in
  2603. * ASCII.
  2604. * @memberOf punycode
  2605. * @param {String} input The domain name or email address to convert, as a
  2606. * Unicode string.
  2607. * @returns {String} The Punycode representation of the given domain name or
  2608. * email address.
  2609. */
  2610. function toASCII(input) {
  2611. return mapDomain(input, function(string) {
  2612. return regexNonASCII.test(string)
  2613. ? 'xn--' + encode(string)
  2614. : string;
  2615. });
  2616. }
  2617. /*--------------------------------------------------------------------------*/
  2618. /** Define the public API */
  2619. punycode = {
  2620. /**
  2621. * A string representing the current Punycode.js version number.
  2622. * @memberOf punycode
  2623. * @type String
  2624. */
  2625. 'version': '1.4.1',
  2626. /**
  2627. * An object of methods to convert from JavaScript's internal character
  2628. * representation (UCS-2) to Unicode code points, and back.
  2629. * @see <https://mathiasbynens.be/notes/javascript-encoding>
  2630. * @memberOf punycode
  2631. * @type Object
  2632. */
  2633. 'ucs2': {
  2634. 'decode': ucs2decode,
  2635. 'encode': ucs2encode
  2636. },
  2637. 'decode': decode,
  2638. 'encode': encode,
  2639. 'toASCII': toASCII,
  2640. 'toUnicode': toUnicode
  2641. };
  2642. /** Expose `punycode` */
  2643. // Some AMD build optimizers, like r.js, check for specific condition patterns
  2644. // like the following:
  2645. if (
  2646. typeof define == 'function' &&
  2647. typeof define.amd == 'object' &&
  2648. define.amd
  2649. ) {
  2650. define('punycode', function() {
  2651. return punycode;
  2652. });
  2653. } else if (freeExports && freeModule) {
  2654. if (module.exports == freeExports) {
  2655. // in Node.js, io.js, or RingoJS v0.8.0+
  2656. freeModule.exports = punycode;
  2657. } else {
  2658. // in Narwhal or RingoJS v0.7.0-
  2659. for (key in punycode) {
  2660. punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);
  2661. }
  2662. }
  2663. } else {
  2664. // in Rhino or a web browser
  2665. root.punycode = punycode;
  2666. }
  2667. }(this));
  2668. }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
  2669. },{}],13:[function(require,module,exports){
  2670. /**
  2671. * This file automatically generated from `pre-publish.js`.
  2672. * Do not manually edit.
  2673. */
  2674. module.exports = {
  2675. "area": true,
  2676. "base": true,
  2677. "br": true,
  2678. "col": true,
  2679. "embed": true,
  2680. "hr": true,
  2681. "img": true,
  2682. "input": true,
  2683. "keygen": true,
  2684. "link": true,
  2685. "menuitem": true,
  2686. "meta": true,
  2687. "param": true,
  2688. "source": true,
  2689. "track": true,
  2690. "wbr": true
  2691. };
  2692. },{}]},{},[3]);