2022-12-03 18:54:54 +00:00
( function ( f ) { if ( typeof exports === "object" && typeof module !== "undefined" ) { module . exports = f ( ) } else if ( typeof define === "function" && define . amd ) { define ( [ ] , f ) } else { var g ; if ( typeof window !== "undefined" ) { g = window } else if ( typeof global !== "undefined" ) { g = global } else if ( typeof self !== "undefined" ) { g = self } else { g = this } g . dagre = f ( ) } } ) ( function ( ) { var define , module , exports ; return 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 ) {
/ *
Copyright ( c ) 2012 - 2014 Chris Pettitt
2022-11-03 13:54:49 +00:00
2022-12-03 18:54:54 +00:00
Permission is hereby granted , free of charge , to any person obtaining a copy
of this software and associated documentation files ( the "Software" ) , to deal
in the Software without restriction , including without limitation the rights
to use , copy , modify , merge , publish , distribute , sublicense , and / or sell
copies of the Software , and to permit persons to whom the Software is
furnished to do so , subject to the following conditions :
2022-11-03 13:54:49 +00:00
2022-12-03 18:54:54 +00:00
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software .
2022-11-03 13:54:49 +00:00
2022-12-03 18:54:54 +00:00
THE SOFTWARE IS PROVIDED "AS IS" , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY ,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT . IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER
LIABILITY , WHETHER IN AN ACTION OF CONTRACT , TORT OR OTHERWISE , ARISING FROM ,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE .
* /
module . exports = { graphlib : require ( "./lib/graphlib" ) , layout : require ( "./lib/layout" ) , debug : require ( "./lib/debug" ) , util : { time : require ( "./lib/util" ) . time , notime : require ( "./lib/util" ) . notime } , version : require ( "./lib/version" ) } } , { "./lib/debug" : 6 , "./lib/graphlib" : 7 , "./lib/layout" : 9 , "./lib/util" : 29 , "./lib/version" : 30 } ] , 2 : [ function ( require , module , exports ) { "use strict" ; var _ = require ( "./lodash" ) ; var greedyFAS = require ( "./greedy-fas" ) ; module . exports = { run : run , undo : undo } ; function run ( g ) { var fas = g . graph ( ) . acyclicer === "greedy" ? greedyFAS ( g , weightFn ( g ) ) : dfsFAS ( g ) ; _ . forEach ( fas , function ( e ) { var label = g . edge ( e ) ; g . removeEdge ( e ) ; label . forwardName = e . name ; label . reversed = true ; g . setEdge ( e . w , e . v , label , _ . uniqueId ( "rev" ) ) } ) ; function weightFn ( g ) { return function ( e ) { return g . edge ( e ) . weight } } } function dfsFAS ( g ) { var fas = [ ] ; var stack = { } ; var visited = { } ; function dfs ( v ) { if ( _ . has ( visited , v ) ) { return } visited [ v ] = true ; stack [ v ] = true ; _ . forEach ( g . outEdges ( v ) , function ( e ) { if ( _ . has ( stack , e . w ) ) { fas . push ( e ) } else { dfs ( e . w ) } } ) ; delete stack [ v ] } _ . forEach ( g . nodes ( ) , dfs ) ; return fas } function undo ( g ) { _ . forEach ( g . edges ( ) , function ( e ) { var label = g . edge ( e ) ; if ( label . reversed ) { g . removeEdge ( e ) ; var forwardName = label . forwardName ; delete label . reversed ; delete label . forwardName ; g . setEdge ( e . w , e . v , label , forwardName ) } } ) } } , { "./greedy-fas" : 8 , "./lodash" : 10 } ] , 3 : [ function ( require , module , exports ) { var _ = require ( "./lodash" ) ; var util = require ( "./util" ) ; module . exports = addBorderSegments ; function addBorderSegments ( g ) { function dfs ( v ) { var children = g . children ( v ) ; var node = g . node ( v ) ; if ( children . length ) { _ . forEach ( children , dfs ) } if ( _ . has ( node , "minRank" ) ) { node . borderLeft = [ ] ; node . borderRight = [ ] ; for ( var rank = node . minRank , maxRank = node . maxRank + 1 ; rank < maxRank ; ++ rank ) { addBorderNode ( g , "borderLeft" , "_bl" , v , node , rank ) ; addBorderNode ( g , "borderRight" , "_br" , v , node , rank ) } } } _ . forEach ( g . children ( ) , dfs ) } function addBorderNode ( g , prop , prefix , sg , sgNode , rank ) { var label = { width : 0 , height : 0 , rank : rank , borderType : prop } ; var prev = sgNode [ prop ] [ rank - 1 ] ; var curr = util . addDummyNode ( g , "border" , label , prefix ) ; sgNode [ prop ] [ rank ] = curr ; g . setParent ( curr , sg ) ; if ( prev ) { g . setEdge ( prev , curr , { weight : 1 } ) } } } , { "./lodash" : 10 , "./util" : 29 } ] , 4 : [ function ( require , module , exports ) { "use strict" ; var _ = require ( "./lodash" ) ; module . exports = { adjust : adjust , undo : undo } ; function adjust ( g ) { var rankDir = g . graph ( ) . rankdir . toLowerCase ( ) ; if ( rankDir === "lr" || rankDir === "rl" ) { swapWidthHeight ( g ) } } function undo ( g ) { var rankDir = g . graph ( ) . rankdir . toLowerCase ( ) ; if ( rankDir === "bt" || rankDir === "rl" ) { reverseY ( g ) } if ( rankDir === "lr" || rankDir === "rl" ) { swapXY ( g ) ; swapWidthHeight ( g ) } } function swapWidthHeight ( g ) { _ . forEach ( g . nodes ( ) , function ( v ) { swapWidthHeightOne ( g . node ( v ) ) } ) ; _ . forEach ( g . edges ( ) , function ( e ) { swapWidthHeightOne ( g . edge ( e ) ) } ) } function swapWidthHeightOne ( attrs ) { var w = attrs . width ; attrs . width = attrs . height ; attrs . height = w } function reverseY ( g ) { _ . forEach ( g . nodes ( ) , function ( v ) { reverseYOne ( g . node ( v ) ) } ) ; _ . forEach ( g . edges ( ) , function ( e ) { var edge = g . edge ( e ) ; _ . forEach ( edge . points , reverseYOne ) ; if ( _ . has ( edge , "y" ) ) { reverseYOne ( edge ) } } ) } function reverseYOne ( attrs ) { attrs . y = - attrs . y } function swapXY ( g ) { _ . forEach ( g . nodes ( ) , function ( v ) { swapXYOne ( g . node ( v ) ) } ) ; _ . forEach ( g . edges ( ) , function ( e ) { var edge = g . edge ( e ) ; _ . forEach ( edge . points , swapXYOne ) ; if ( _ . has ( edge , "x" ) ) { swapXYOne ( edge ) } } ) } function swapXYOne ( attrs ) { var x = attrs . x ; attrs . x = attrs . y ; attrs . y = x } } , { "./lodash" : 10 } ] , 5 : [ function ( require , module , exports ) {
/ *
* Simple doubly linked list implementation derived from Cormen , et al . ,
* "Introduction to Algorithms" .
* /
module . exports = List ; function List ( ) { var sentinel = { } ; sentinel . _next = sentinel . _prev = sentinel ; this . _sentinel = sentinel } List . prototype . dequeue = function ( ) { var sentinel = this . _sentinel ; var entry = sentinel . _prev ; if ( entry !== sentinel ) { unlink ( entry ) ; return entry } } ; List . prototype . enqueue = function ( entry ) { var sentinel = this . _sentinel ; if ( entry . _prev && entry . _next ) { unlink ( entry ) } entry . _next = sentinel . _next ; sentinel . _next . _prev = entry ; sentinel . _next = entry ; entry . _prev = sentinel } ; List . prototype . toString = function ( ) { var strs = [ ] ; var sentinel = this . _sentinel ; var curr = sentinel . _prev ; while ( curr !== sentinel ) { strs . push ( JSON . stringify ( curr , filterOutLinks ) ) ; curr = curr . _prev } return "[" + strs . join ( ", " ) + "]" } ; function unlink ( entry ) { entry . _prev . _next = entry . _next ; entry . _next . _prev = entry . _prev ; delete entry . _next ; delete entry . _prev } function filterOutLinks ( k , v ) { if ( k !== "_next" && k !== "_prev" ) { return v } } } , { } ] , 6 : [ function ( require , module , exports ) { var _ = require ( "./lodash" ) ; var util = require ( "./util" ) ; var Graph = require ( "./graphlib" ) . Graph ; module . exports = { debugOrdering : debugOrdering } ;
/* istanbul ignore next */ function debugOrdering ( g ) { var layerMatrix = util . buildLayerMatrix ( g ) ; var h = new Graph ( { compound : true , multigraph : true } ) . setGraph ( { } ) ; _ . forEach ( g . nodes ( ) , function ( v ) { h . setNode ( v , { label : v } ) ; h . setParent ( v , "layer" + g . node ( v ) . rank ) } ) ; _ . forEach ( g . edges ( ) , function ( e ) { h . setEdge ( e . v , e . w , { } , e . name ) } ) ; _ . forEach ( layerMatrix , function ( layer , i ) { var layerV = "layer" + i ; h . setNode ( layerV , { rank : "same" } ) ; _ . reduce ( layer , function ( u , v ) { h . setEdge ( u , v , { style : "invis" } ) ; return v } ) } ) ; return h } } , { "./graphlib" : 7 , "./lodash" : 10 , "./util" : 29 } ] , 7 : [ function ( require , module , exports ) {
/* global window */
var graphlib ; if ( typeof require === "function" ) { try { graphlib = require ( "graphlib" ) } catch ( e ) {
// continue regardless of error
} } if ( ! graphlib ) { graphlib = window . graphlib } module . exports = graphlib } , { graphlib : 31 } ] , 8 : [ function ( require , module , exports ) { var _ = require ( "./lodash" ) ; var Graph = require ( "./graphlib" ) . Graph ; var List = require ( "./data/list" ) ;
/ *
* A greedy heuristic for finding a feedback arc set for a graph . A feedback
* arc set is a set of edges that can be removed to make a graph acyclic .
* The algorithm comes from : P . Eades , X . Lin , and W . F . Smyth , " A fast and
* effective heuristic for the feedback arc set problem . " This implementation
* adjusts that from the paper to allow for weighted edges .
* / m o d u l e . e x p o r t s = g r e e d y F A S ; v a r D E F A U L T _ W E I G H T _ F N = _ . c o n s t a n t ( 1 ) ; f u n c t i o n g r e e d y F A S ( g , w e i g h t F n ) { i f ( g . n o d e C o u n t ( ) < = 1 ) { r e t u r n [ ] } v a r s t a t e = b u i l d S t a t e ( g , w e i g h t F n | | D E F A U L T _ W E I G H T _ F N ) ; v a r r e s u l t s = d o G r e e d y F A S ( s t a t e . g r a p h , s t a t e . b u c k e t s , s t a t e . z e r o I d x ) ;
// Expand multi-edges
return _ . flatten ( _ . map ( results , function ( e ) { return g . outEdges ( e . v , e . w ) } ) , true ) } function doGreedyFAS ( g , buckets , zeroIdx ) { var results = [ ] ; var sources = buckets [ buckets . length - 1 ] ; var sinks = buckets [ 0 ] ; var entry ; while ( g . nodeCount ( ) ) { while ( entry = sinks . dequeue ( ) ) { removeNode ( g , buckets , zeroIdx , entry ) } while ( entry = sources . dequeue ( ) ) { removeNode ( g , buckets , zeroIdx , entry ) } if ( g . nodeCount ( ) ) { for ( var i = buckets . length - 2 ; i > 0 ; -- i ) { entry = buckets [ i ] . dequeue ( ) ; if ( entry ) { results = results . concat ( removeNode ( g , buckets , zeroIdx , entry , true ) ) ; break } } } } return results } function removeNode ( g , buckets , zeroIdx , entry , collectPredecessors ) { var results = collectPredecessors ? [ ] : undefined ; _ . forEach ( g . inEdges ( entry . v ) , function ( edge ) { var weight = g . edge ( edge ) ; var uEntry = g . node ( edge . v ) ; if ( collectPredecessors ) { results . push ( { v : edge . v , w : edge . w } ) } uEntry . out -= weight ; assignBucket ( buckets , zeroIdx , uEntry ) } ) ; _ . forEach ( g . outEdges ( entry . v ) , function ( edge ) { var weight = g . edge ( edge ) ; var w = edge . w ; var wEntry = g . node ( w ) ; wEntry [ "in" ] -= weight ; assignBucket ( buckets , zeroIdx , wEntry ) } ) ; g . removeNode ( entry . v ) ; return results } function buildState ( g , weightFn ) { var fasGraph = new Graph ; var maxIn = 0 ; var maxOut = 0 ; _ . forEach ( g . nodes ( ) , function ( v ) { fasGraph . setNode ( v , { v : v , in : 0 , out : 0 } ) } ) ;
// Aggregate weights on nodes, but also sum the weights across multi-edges
// into a single edge for the fasGraph.
_ . forEach ( g . edges ( ) , function ( e ) { var prevWeight = fasGraph . edge ( e . v , e . w ) || 0 ; var weight = weightFn ( e ) ; var edgeWeight = prevWeight + weight ; fasGraph . setEdge ( e . v , e . w , edgeWeight ) ; maxOut = Math . max ( maxOut , fasGraph . node ( e . v ) . out += weight ) ; maxIn = Math . max ( maxIn , fasGraph . node ( e . w ) [ "in" ] += weight ) } ) ; var buckets = _ . range ( maxOut + maxIn + 3 ) . map ( function ( ) { return new List } ) ; var zeroIdx = maxIn + 1 ; _ . forEach ( fasGraph . nodes ( ) , function ( v ) { assignBucket ( buckets , zeroIdx , fasGraph . node ( v ) ) } ) ; return { graph : fasGraph , buckets : buckets , zeroIdx : zeroIdx } } function assignBucket ( buckets , zeroIdx , entry ) { if ( ! entry . out ) { buckets [ 0 ] . enqueue ( entry ) } else if ( ! entry [ "in" ] ) { buckets [ buckets . length - 1 ] . enqueue ( entry ) } else { buckets [ entry . out - entry [ "in" ] + zeroIdx ] . enqueue ( entry ) } } } , { "./data/list" : 5 , "./graphlib" : 7 , "./lodash" : 10 } ] , 9 : [ function ( require , module , exports ) { "use strict" ; var _ = require ( "./lodash" ) ; var acyclic = require ( "./acyclic" ) ; var normalize = require ( "./normalize" ) ; var rank = require ( "./rank" ) ; var normalizeRanks = require ( "./util" ) . normalizeRanks ; var parentDummyChains = require ( "./parent-dummy-chains" ) ; var removeEmptyRanks = require ( "./util" ) . removeEmptyRanks ; var nestingGraph = require ( "./nesting-graph" ) ; var addBorderSegments = require ( "./add-border-segments" ) ; var coordinateSystem = require ( "./coordinate-system" ) ; var order = require ( "./order" ) ; var position = require ( "./position" ) ; var util = require ( "./util" ) ; var Graph = require ( "./graphlib" ) . Graph ; module . exports = layout ; function layout ( g , opts ) { var time = opts && opts . debugTiming ? util . time : util . notime ; time ( "layout" , function ( ) { var layoutGraph = time ( " buildLayoutGraph" , function ( ) { return buildLayoutGraph ( g ) } ) ; time ( " runLayout" , function ( ) { runLayout ( layoutGraph , time ) } ) ; time ( " updateInputGraph" , function ( ) { updateInputGraph ( g , layoutGraph ) } ) } ) } function runLayout ( g , time ) { time ( " makeSpaceForEdgeLabels" , function ( ) { makeSpaceForEdgeLabels ( g ) } ) ; time ( " removeSelfEdges" , function ( ) { removeSelfEdges ( g ) } ) ; time ( " acyclic" , function ( ) { acyclic . run ( g ) } ) ; time ( " nestingGraph.run" , function ( ) { nestingGraph . run ( g ) } ) ; time ( " rank" , function ( ) { rank ( util . asNonCompoundGraph ( g ) ) } ) ; time ( " injectEdgeLabelProxies" , function ( ) { injectEdgeLabelProxies ( g ) } ) ; time ( " removeEmptyRanks" , function ( ) { removeEmptyRanks ( g ) } ) ; time ( " nestingGraph.cleanup" , function ( ) { nestingGraph . cleanup ( g ) } ) ; time ( " normalizeRanks" , function ( ) { normalizeRanks ( g ) } ) ; time ( " assignRankMinMax" , function ( ) { assignRankMinMax ( g ) } ) ; time ( " removeEdgeLabelProxies" , function ( ) { removeEdgeLabelProxies ( g ) } ) ; time ( " normalize.run" , function ( ) { normalize . run ( g ) } ) ; time ( " parentDummyChains" , function ( ) { parentDummyChains ( g ) } ) ; time ( " addBorderSegments" , function ( ) { addBorderSegments ( g ) } ) ; time ( " order" , function ( ) { order ( g ) } ) ; time ( " insertSelfEdges" , function ( ) { insertSelfEdges ( g ) } ) ; time ( " adjustCoordinateSystem" , function ( ) { coordinateSystem . adjust ( g ) } ) ; time ( " position" , function ( ) { position ( g ) } ) ; time ( " positionSelfEdges" , function ( ) { positionSelfEdges ( g ) } ) ; time ( " removeBorderNodes" , function ( ) { removeBorderNodes ( g ) } ) ; time ( " normalize.undo" , function ( ) { normalize . undo ( g ) } ) ; time ( " fixupEdgeLabelCoords" , function ( ) { fixupEdgeLabelCoords ( g ) } ) ; time ( " undoCoordinateSystem" , function ( ) { coordinateSystem . undo ( g ) } ) ; time ( " translateGraph" , function ( ) { translateGraph ( g ) } ) ; time ( " assignNodeIntersects" , function ( ) { assignNodeIntersects ( g ) } ) ; time ( " reversePoints" , function ( ) { reversePointsForReversedEdges ( g ) } ) ; time ( " acyclic.undo" , function ( ) { acyclic . undo ( g ) } ) }
/ *
* Copies final layout information from the layout graph back to the input
* graph . This process only copies whitelisted attributes from the layout graph
* to the input graph , so it serves as a good place to determine what
* attributes can influence layout .
* / f u n c t i o n u p d a t e I n p u t G r a p h ( i n p u t G r a p h , l a y o u t G r a p h ) { _ . f o r E a c h ( i n p u t G r a p h . n o d e s ( ) , f u n c t i o n ( v ) { v a r i n p u t L a b e l = i n p u t G r a p h . n o d e ( v ) ; v a r l a y o u t L a b e l = l a y o u t G r a p h . n o d e ( v ) ; i f ( i n p u t L a b e l ) { i n p u t L a b e l . x = l a y o u t L a b e l . x ; i n p u t L a b e l . y = l a y o u t L a b e l . y ; i f ( l a y o u t G r a p h . c h i l d r e n ( v ) . l e n g t h ) { i n p u t L a b e l . w i d t h = l a y o u t L a b e l . w i d t h ; i n p u t L a b e l . h e i g h t = l a y o u t L a b e l . h e i g h t } } } ) ; _ . f o r E a c h ( i n p u t G r a p h . e d g e s ( ) , f u n c t i o n ( e ) { v a r i n p u t L a b e l = i n p u t G r a p h . e d g e ( e ) ; v a r l a y o u t L a b e l = l a y o u t G r a p h . e d g e ( e ) ; i n p u t L a b e l . p o i n t s = l a y o u t L a b e l . p o i n t s ; i f ( _ . h a s ( l a y o u t L a b e l , " x " ) ) { i n p u t L a b e l . x = l a y o u t L a b e l . x ; i n p u t L a b e l . y = l a y o u t L a b e l . y } } ) ; i n p u t G r a p h . g r a p h ( ) . w i d t h = l a y o u t G r a p h . g r a p h ( ) . w i d t h ; i n p u t G r a p h . g r a p h ( ) . h e i g h t = l a y o u t G r a p h . g r a p h ( ) . h e i g h t } v a r g r a p h N u m A t t r s = [ " n o d e s e p " , " e d g e s e p " , " r a n k s e p " , " m a r g i n x " , " m a r g i n y " ] ; v a r g r a p h D e f a u l t s = { r a n k s e p : 5 0 , e d g e s e p : 2 0 , n o d e s e p : 5 0 , r a n k d i r : " t b " } ; v a r g r a p h A t t r s = [ " a c y c l i c e r " , " r a n k e r " , " r a n k d i r " , " a l i g n " ] ; v a r n o d e N u m A t t r s = [ " w i d t h " , " h e i g h t " ] ; v a r n o d e D e f a u l t s = { w i d t h : 0 , h e i g h t : 0 } ; v a r e d g e N u m A t t r s = [ " m i n l e n " , " w e i g h t " , " w i d t h " , " h e i g h t " , " l a b e l o f f s e t " ] ; v a r e d g e D e f a u l t s = { m i n l e n : 1 , w e i g h t : 1 , w i d t h : 0 , h e i g h t : 0 , l a b e l o f f s e t : 1 0 , l a b e l p o s : " r " } ; v a r e d g e A t t r s = [ " l a b e l p o s " ] ;
/ *
* Constructs a new graph from the input graph , which can be used for layout .
* This process copies only whitelisted attributes from the input graph to the
* layout graph . Thus this function serves as a good place to determine what
* attributes can influence layout .
* / f u n c t i o n b u i l d L a y o u t G r a p h ( i n p u t G r a p h ) { v a r g = n e w G r a p h ( { m u l t i g r a p h : t r u e , c o m p o u n d : t r u e } ) ; v a r g r a p h = c a n o n i c a l i z e ( i n p u t G r a p h . g r a p h ( ) ) ; g . s e t G r a p h ( _ . m e r g e ( { } , g r a p h D e f a u l t s , s e l e c t N u m b e r A t t r s ( g r a p h , g r a p h N u m A t t r s ) , _ . p i c k ( g r a p h , g r a p h A t t r s ) ) ) ; _ . f o r E a c h ( i n p u t G r a p h . n o d e s ( ) , f u n c t i o n ( v ) { v a r n o d e = c a n o n i c a l i z e ( i n p u t G r a p h . n o d e ( v ) ) ; g . s e t N o d e ( v , _ . d e f a u l t s ( s e l e c t N u m b e r A t t r s ( n o d e , n o d e N u m A t t r s ) , n o d e D e f a u l t s ) ) ; g . s e t P a r e n t ( v , i n p u t G r a p h . p a r e n t ( v ) ) } ) ; _ . f o r E a c h ( i n p u t G r a p h . e d g e s ( ) , f u n c t i o n ( e ) { v a r e d g e = c a n o n i c a l i z e ( i n p u t G r a p h . e d g e ( e ) ) ; g . s e t E d g e ( e , _ . m e r g e ( { } , e d g e D e f a u l t s , s e l e c t N u m b e r A t t r s ( e d g e , e d g e N u m A t t r s ) , _ . p i c k ( e d g e , e d g e A t t r s ) ) ) } ) ; r e t u r n g }
/ *
* This idea comes from the Gansner paper : to account for edge labels in our
* layout we split each rank in half by doubling minlen and halving ranksep .
* Then we can place labels at these mid - points between nodes .
*
* We also add some minimal padding to the width to push the label for the edge
* away from the edge itself a bit .
* /function makeSpaceForEdgeLabels(g){var graph=g.graph();graph.ranksep/ = 2 ; _ . forEach ( g . edges ( ) , function ( e ) { var edge = g . edge ( e ) ; edge . minlen *= 2 ; if ( edge . labelpos . toLowerCase ( ) !== "c" ) { if ( graph . rankdir === "TB" || graph . rankdir === "BT" ) { edge . width += edge . labeloffset } else { edge . height += edge . labeloffset } } } ) }
/ *
* Creates temporary dummy nodes that capture the rank in which each edge ' s
* label is going to , if it has one of non - zero width and height . We do this
* so that we can safely remove empty ranks while preserving balance for the
* label ' s position .
* / f u n c t i o n i n j e c t E d g e L a b e l P r o x i e s ( g ) { _ . f o r E a c h ( g . e d g e s ( ) , f u n c t i o n ( e ) { v a r e d g e = g . e d g e ( e ) ; i f ( e d g e . w i d t h & & e d g e . h e i g h t ) { v a r v = g . n o d e ( e . v ) ; v a r w = g . n o d e ( e . w ) ; v a r l a b e l = { r a n k : ( w . r a n k - v . r a n k ) / 2 + v . r a n k , e : e } ; u t i l . a d d D u m m y N o d e ( g , " e d g e - p r o x y " , l a b e l , " _ e p " ) } } ) } f u n c t i o n a s s i g n R a n k M i n M a x ( g ) { v a r m a x R a n k = 0 ; _ . f o r E a c h ( g . n o d e s ( ) , f u n c t i o n ( v ) { v a r n o d e = g . n o d e ( v ) ; i f ( n o d e . b o r d e r T o p ) { n o d e . m i n R a n k = g . n o d e ( n o d e . b o r d e r T o p ) . r a n k ; n o d e . m a x R a n k = g . n o d e ( n o d e . b o r d e r B o t t o m ) . r a n k ; m a x R a n k = _ . m a x ( m a x R a n k , n o d e . m a x R a n k ) } } ) ; g . g r a p h ( ) . m a x R a n k = m a x R a n k } f u n c t i o n r e m o v e E d g e L a b e l P r o x i e s ( g ) { _ . f o r E a c h ( g . n o d e s ( ) , f u n c t i o n ( v ) { v a r n o d e = g . n o d e ( v ) ; i f ( n o d e . d u m m y = = = " e d g e - p r o x y " ) { g . e d g e ( n o d e . e ) . l a b e l R a n k = n o d e . r a n k ; g . r e m o v e N o d e ( v ) } } ) } f u n c t i o n t r a n s l a t e G r a p h ( g ) { v a r m i n X = N u m b e r . P O S I T I V E _ I N F I N I T Y ; v a r m a x X = 0 ; v a r m i n Y = N u m b e r . P O S I T I V E _ I N F I N I T Y ; v a r m a x Y = 0 ; v a r g r a p h L a b e l = g . g r a p h ( ) ; v a r m a r g i n X = g r a p h L a b e l . m a r g i n x | | 0 ; v a r m a r g i n Y = g r a p h L a b e l . m a r g i n y | | 0 ; f u n c t i o n g e t E x t r e m e s ( a t t r s ) { v a r x = a t t r s . x ; v a r y = a t t r s . y ; v a r w = a t t r s . w i d t h ; v a r h = a t t r s . h e i g h t ; m i n X = M a t h . m i n ( m i n X , x - w / 2 ) ; m a x X = M a t h . m a x ( m a x X , x + w / 2 ) ; m i n Y = M a t h . m i n ( m i n Y , y - h / 2 ) ; m a x Y = M a t h . m a x ( m a x Y , y + h / 2 ) } _ . f o r E a c h ( g . n o d e s ( ) , f u n c t i o n ( v ) { g e t E x t r e m e s ( g . n o d e ( v ) ) } ) ; _ . f o r E a c h ( g . e d g e s ( ) , f u n c t i o n ( e ) { v a r e d g e = g . e d g e ( e ) ; i f ( _ . h a s ( e d g e , " x " ) ) { g e t E x t r e m e s ( e d g e ) } } ) ; m i n X - = m a r g i n X ; m i n Y - = m a r g i n Y ; _ . f o r E a c h ( g . n o d e s ( ) , f u n c t i o n ( v ) { v a r n o d e = g . n o d e ( v ) ; n o d e . x - = m i n X ; n o d e . y - = m i n Y } ) ; _ . f o r E a c h ( g . e d g e s ( ) , f u n c t i o n ( e ) { v a r e d g e = g . e d g e ( e ) ; _ . f o r E a c h ( e d g e . p o i n t s , f u n c t i o n ( p ) { p . x - = m i n X ; p . y - = m i n Y } ) ; i f ( _ . h a s ( e d g e , " x " ) ) { e d g e . x - = m i n X } i f ( _ . h a s ( e d g e , " y " ) ) { e d g e . y - = m i n Y } } ) ; g r a p h L a b e l . w i d t h = m a x X - m i n X + m a r g i n X ; g r a p h L a b e l . h e i g h t = m a x Y - m i n Y + m a r g i n Y } f u n c t i o n a s s i g n N o d e I n t e r s e c t s ( g ) { _ . f o r E a c h ( g . e d g e s ( ) , f u n c t i o n ( e ) { v a r e d g e = g . e d g e ( e ) ; v a r n o d e V = g . n o d e ( e . v ) ; v a r n o d e W = g . n o d e ( e . w ) ; v a r p 1 , p 2 ; i f ( ! e d g e . p o i n t s ) { e d g e . p o i n t s = [ ] ; p 1 = n o d e W ; p 2 = n o d e V } e l s e { p 1 = e d g e . p o i n t s [ 0 ] ; p 2 = e d g e . p o i n t s [ e d g e . p o i n t s . l e n g t h - 1 ] } e d g e . p o i n t s . u n s h i f t ( u t i l . i n t e r s e c t R e c t ( n o d e V , p 1 ) ) ; e d g e . p o i n t s . p u s h ( u t i l . i n t e r s e c t R e c t ( n o d e W , p 2 ) ) } ) } f u n c t i o n f i x u p E d g e L a b e l C o o r d s ( g ) { _ . f o r E a c h ( g . e d g e s ( ) , f u n c t i o n ( e ) { v a r e d g e = g . e d g e ( e ) ; i f ( _ . h a s ( e d g e , " x " ) ) { i f ( e d g e . l a b e l p o s = = = " l " | | e d g e . l a b e l p o s = = = " r " ) { e d g e . w i d t h - = e d g e . l a b e l o f f s e t } s w i t c h ( e d g e . l a b e l p o s ) { c a s e " l " : e d g e . x - = e d g e . w i d t h / 2 + e d g e . l a b e l o f f s e t ; b r e a k ; c a s e " r " : e d g e . x + = e d g e . w i d t h / 2 + e d g e . l a b e l o f f s e t ; b r e a k } } } ) } f u n c t i o n r e v e r s e P o i n t s F o r R e v e r s e d E d g e s ( g ) { _ . f o r E a c h ( g . e d g e s ( ) , f u n c t i o n ( e ) { v a r e d g e = g . e d g e ( e ) ; i f ( e d g e . r e v e r s e d ) { e d g e . p o i n t s . r e v e r s e ( ) } } ) } f u n c t i o n r e m o v e B o r d e r N o d e s ( g ) { _ . f o r E a c h ( g . n o d e s ( ) , f u n c t i o n ( v ) { i f ( g . c h i l d r e n ( v ) . l e n g t h ) { v a r n o d e = g . n o d e ( v ) ; v a r t = g . n o d e ( n o d e . b o r d e r T o p ) ; v a r b = g . n o d e ( n o d e . b o r d e r B o t t o m ) ; v a r l = g . n o d e ( _ . l a s t ( n o d e . b o r d e r L e f t ) ) ; v a r r = g . n o d e ( _ . l a s t ( n o d e . b o r d e r R i g h t ) ) ; n o d e . w i d t h = M a t h . a b s ( r . x - l . x ) ; n o d e . h e i g h t = M a t h . a b s ( b . y - t . y ) ; n o d e . x = l . x + n o d e . w i d t h / 2 ; n o d e . y = t . y + n o d e . h e i g h t / 2 } } ) ; _ . f o r E a c h ( g . n o d e s ( ) , f u n c t i o n ( v ) { i f ( g . n o d e ( v ) . d u m m y = = = " b o r d e r " ) { g . r e m o v e N o d e ( v ) } } ) } f u n c t i o n r e m o v e S e l f E d g e s ( g ) { _ . f o r E a c h ( g . e d g e s ( ) , f u n c t i o n ( e ) { i f ( e . v = = = e . w ) { v a r n o d e = g . n o d e ( e . v ) ; i f ( ! n o d e . s e l f E d g e s ) { n o d e . s e l f E d g e s = [ ] } n o d e . s e l f E d g e s . p u s h ( { e : e , l a b e l : g . e d g e ( e ) } ) ; g . r e m o v e E d g e ( e ) } } ) } f u n c t i o n i n s e r t S e l f E d g e s ( g ) { v a r l a y e r s = u t i l . b u i l d L a y e r M a t r i x ( g ) ; _ . f o r E a c h ( l a y e r s , f u n c t i o n ( l a y e r ) { v a r o r d e r S h i f t = 0 ; _ . f o r E a c h ( l a y e r , f u n c t i o n ( v , i ) { v a r n o d e = g . n o d e ( v ) ; n o d e . o r d e r = i + o r d e r S h i f t ; _ . f o r E a c h ( n o d e . s e l f E d g e s , f u n c t i o n ( s e l f E d g e ) { u t i l . a d d D u m m y N o d e ( g , " s e l f e d g e " , { w i d t h : s e l f E d g e . l a b e l . w i d t h , h e i g h t : s e l f E d g e . l a b e l . h e i g h t , r a n k : n o d e . r a n k , o r d e r : i + + + o r d e r S h i f t , e : s e l f E d g e . e , l a b e l : s e l f E d g e . l a b e l } , " _ s e " ) } ) ; d e l e t e n o d e . s e l f E d g e s } ) } ) } f u n c t i o n p o s i t i o n S e l f E d g e s ( g ) { _ . f o r E a c h ( g . n o d e s ( ) , f u n c t i o n ( v ) { v a r n o d e = g . n o d e ( v ) ; i f ( n o d e . d u m m y = = = " s e l f e d g e " ) { v a r s e l f N o d e = g . n o d e ( n o d e . e . v ) ; v a r x = s e l f N o d e . x + s e l f N o d e . w i d t h / 2 ; v a r y = s e l f N o d e . y ; v a r d x = n o d e . x - x ; v a r d y = s e l f N o d e . h e i g h t / 2 ; g . s e t E d g e ( n o d e . e , n o d e . l a b e l ) ; g . r e m o v e N o d e ( v ) ; n o d e . l a b e l . p o i n t s = [ { x : x + 2 * d x / 3 , y : y - d y } , { x : x + 5 * d x / 6 , y : y - d y } , { x : x + d x , y : y } , { x : x + 5 * d x / 6 , y : y + d y } , { x : x + 2 * d x / 3 , y : y + d y } ] ; n o d e . l a b e l . x = n o d e . x ; n o d e . l a b e l . y = n o d e . y } } ) } f u n c t i o n s e l e c t N u m b e r A t t r s ( o b j , a t t r s ) { r e t u r n _ . m a p V a l u e s ( _ . p i c k ( o b j , a t t r s ) , N u m b e r ) } f u n c t i o n c a n o n i c a l i z e ( a t t r s ) { v a r n e w A t t r s = { } ; _ . f o r E a c h ( a t t r s , f u n c t i o n ( v , k ) { n e w A t t r s [ k . t o L o w e r C a s e ( ) ] = v } ) ; r e t u r n n e w A t t r s } } , { " . / a c y c l i c " : 2 , " .
/* global window */
var lodash ; if ( typeof require === "function" ) { try { lodash = { cloneDeep : require ( "lodash/cloneDeep" ) , constant : require ( "lodash/constant" ) , defaults : require ( "lodash/defaults" ) , each : require ( "lodash/each" ) , filter : require ( "lodash/filter" ) , find : require ( "lodash/find" ) , flatten : require ( "lodash/flatten" ) , forEach : require ( "lodash/forEach" ) , forIn : require ( "lodash/forIn" ) , has : require ( "lodash/has" ) , isUndefined : require ( "lodash/isUndefined" ) , last : require ( "lodash/last" ) , map : require ( "lodash/map" ) , mapValues : require ( "lodash/mapValues" ) , max : require ( "lodash/max" ) , merge : require ( "lodash/merge" ) , min : require ( "lodash/min" ) , minBy : require ( "lodash/minBy" ) , now : require ( "lodash/now" ) , pick : require ( "lodash/pick" ) , range : require ( "lodash/range" ) , reduce : require ( "lodash/reduce" ) , sortBy : require ( "lodash/sortBy" ) , uniqueId : require ( "lodash/uniqueId" ) , values : require ( "lodash/values" ) , zipObject : require ( "lodash/zipObject" ) } } catch ( e ) {
// continue regardless of error
} } if ( ! lodash ) { lodash = window . _ } module . exports = lodash } , { "lodash/cloneDeep" : 227 , "lodash/constant" : 228 , "lodash/defaults" : 229 , "lodash/each" : 230 , "lodash/filter" : 232 , "lodash/find" : 233 , "lodash/flatten" : 235 , "lodash/forEach" : 236 , "lodash/forIn" : 237 , "lodash/has" : 239 , "lodash/isUndefined" : 258 , "lodash/last" : 261 , "lodash/map" : 262 , "lodash/mapValues" : 263 , "lodash/max" : 264 , "lodash/merge" : 266 , "lodash/min" : 267 , "lodash/minBy" : 268 , "lodash/now" : 270 , "lodash/pick" : 271 , "lodash/range" : 273 , "lodash/reduce" : 274 , "lodash/sortBy" : 276 , "lodash/uniqueId" : 286 , "lodash/values" : 287 , "lodash/zipObject" : 288 } ] , 11 : [ function ( require , module , exports ) { var _ = require ( "./lodash" ) ; var util = require ( "./util" ) ; module . exports = { run : run , cleanup : cleanup } ;
/ *
* A nesting graph creates dummy nodes for the tops and bottoms of subgraphs ,
* adds appropriate edges to ensure that all cluster nodes are placed between
2022-12-26 16:47:39 +00:00
* these boundaries , and ensures that the graph is connected .
2022-12-03 18:54:54 +00:00
*
* In addition we ensure , through the use of the minlen property , that nodes
* and subgraph border nodes to not end up on the same rank .
*
* Preconditions :
*
* 1. Input graph is a DAG
* 2. Nodes in the input graph has a minlen attribute
*
* Postconditions :
*
* 1. Input graph is connected .
* 2. Dummy nodes are added for the tops and bottoms of subgraphs .
* 3. The minlen attribute for nodes is adjusted to ensure nodes do not
* get placed on the same rank as subgraph border nodes .
*
* The nesting graph idea comes from Sander , " Layout of Compound Directed
* Graphs . "
* /function run(g){var root=util.addDummyNode(g,"root",{},"_root");var depths=treeDepths(g);var height=_.max(_.values(depths))-1;/ / Note : depths is an Object not an array
var nodeSep = 2 * height + 1 ; g . graph ( ) . nestingRoot = root ;
// Multiply minlen by nodeSep to align nodes on non-border ranks.
_ . forEach ( g . edges ( ) , function ( e ) { g . edge ( e ) . minlen *= nodeSep } ) ;
// Calculate a weight that is sufficient to keep subgraphs vertically compact
var weight = sumWeights ( g ) + 1 ;
// Create border nodes and link them up
_ . forEach ( g . children ( ) , function ( child ) { dfs ( g , root , nodeSep , weight , height , depths , child ) } ) ;
// Save the multiplier for node layers for later removal of empty border
// layers.
g . graph ( ) . nodeRankFactor = nodeSep } function dfs ( g , root , nodeSep , weight , height , depths , v ) { var children = g . children ( v ) ; if ( ! children . length ) { if ( v !== root ) { g . setEdge ( root , v , { weight : 0 , minlen : nodeSep } ) } return } var top = util . addBorderNode ( g , "_bt" ) ; var bottom = util . addBorderNode ( g , "_bb" ) ; var label = g . node ( v ) ; g . setParent ( top , v ) ; label . borderTop = top ; g . setParent ( bottom , v ) ; label . borderBottom = bottom ; _ . forEach ( children , function ( child ) { dfs ( g , root , nodeSep , weight , height , depths , child ) ; var childNode = g . node ( child ) ; var childTop = childNode . borderTop ? childNode . borderTop : child ; var childBottom = childNode . borderBottom ? childNode . borderBottom : child ; var thisWeight = childNode . borderTop ? weight : 2 * weight ; var minlen = childTop !== childBottom ? 1 : height - depths [ v ] + 1 ; g . setEdge ( top , childTop , { weight : thisWeight , minlen : minlen , nestingEdge : true } ) ; g . setEdge ( childBottom , bottom , { weight : thisWeight , minlen : minlen , nestingEdge : true } ) } ) ; if ( ! g . parent ( v ) ) { g . setEdge ( root , top , { weight : 0 , minlen : height + depths [ v ] } ) } } function treeDepths ( g ) { var depths = { } ; function dfs ( v , depth ) { var children = g . children ( v ) ; if ( children && children . length ) { _ . forEach ( children , function ( child ) { dfs ( child , depth + 1 ) } ) } depths [ v ] = depth } _ . forEach ( g . children ( ) , function ( v ) { dfs ( v , 1 ) } ) ; return depths } function sumWeights ( g ) { return _ . reduce ( g . edges ( ) , function ( acc , e ) { return acc + g . edge ( e ) . weight } , 0 ) } function cleanup ( g ) { var graphLabel = g . graph ( ) ; g . removeNode ( graphLabel . nestingRoot ) ; delete graphLabel . nestingRoot ; _ . forEach ( g . edges ( ) , function ( e ) { var edge = g . edge ( e ) ; if ( edge . nestingEdge ) { g . removeEdge ( e ) } } ) } } , { "./lodash" : 10 , "./util" : 29 } ] , 12 : [ function ( require , module , exports ) { "use strict" ; var _ = require ( "./lodash" ) ; var util = require ( "./util" ) ; module . exports = { run : run , undo : undo } ;
/ *
* Breaks any long edges in the graph into short segments that span 1 layer
* each . This operation is undoable with the denormalize function .
*
* Pre - conditions :
*
* 1. The input graph is a DAG .
* 2. Each node in the graph has a "rank" property .
*
* Post - condition :
*
* 1. All edges in the graph have a length of 1.
* 2. Dummy nodes are added where edges have been split into segments .
* 3. The graph is augmented with a "dummyChains" attribute which contains
* the first dummy in each chain of dummy nodes produced .
* / f u n c t i o n r u n ( g ) { g . g r a p h ( ) . d u m m y C h a i n s = [ ] ; _ . f o r E a c h ( g . e d g e s ( ) , f u n c t i o n ( e d g e ) { n o r m a l i z e E d g e ( g , e d g e ) } ) } f u n c t i o n n o r m a l i z e E d g e ( g , e ) { v a r v = e . v ; v a r v R a n k = g . n o d e ( v ) . r a n k ; v a r w = e . w ; v a r w R a n k = g . n o d e ( w ) . r a n k ; v a r n a m e = e . n a m e ; v a r e d g e L a b e l = g . e d g e ( e ) ; v a r l a b e l R a n k = e d g e L a b e l . l a b e l R a n k ; i f ( w R a n k = = = v R a n k + 1 ) r e t u r n ; g . r e m o v e E d g e ( e ) ; v a r d u m m y , a t t r s , i ; f o r ( i = 0 , + + v R a n k ; v R a n k < w R a n k ; + + i , + + v R a n k ) { e d g e L a b e l . p o i n t s = [ ] ; a t t r s = { w i d t h : 0 , h e i g h t : 0 , e d g e L a b e l : e d g e L a b e l , e d g e O b j : e , r a n k : v R a n k } ; d u m m y = u t i l . a d d D u m m y N o d e ( g , " e d g e " , a t t r s , " _ d " ) ; i f ( v R a n k = = = l a b e l R a n k ) { a t t r s . w i d t h = e d g e L a b e l . w i d t h ; a t t r s . h e i g h t = e d g e L a b e l . h e i g h t ; a t t r s . d u m m y = " e d g e - l a b e l " ; a t t r s . l a b e l p o s = e d g e L a b e l . l a b e l p o s } g . s e t E d g e ( v , d u m m y , { w e i g h t : e d g e L a b e l . w e i g h t } , n a m e ) ; i f ( i = = = 0 ) { g . g r a p h ( ) . d u m m y C h a i n s . p u s h ( d u m m y ) } v = d u m m y } g . s e t E d g e ( v , w , { w e i g h t : e d g e L a b e l . w e i g h t } , n a m e ) } f u n c t i o n u n d o ( g ) { _ . f o r E a c h ( g . g r a p h ( ) . d u m m y C h a i n s , f u n c t i o n ( v ) { v a r n o d e = g . n o d e ( v ) ; v a r o r i g L a b e l = n o d e . e d g e L a b e l ; v a r w ; g . s e t E d g e ( n o d e . e d g e O b j , o r i g L a b e l ) ; w h i l e ( n o d e . d u m m y ) { w = g . s u c c e s s o r s ( v ) [ 0 ] ; g . r e m o v e N o d e ( v ) ; o r i g L a b e l . p o i n t s . p u s h ( { x : n o d e . x , y : n o d e . y } ) ; i f ( n o d e . d u m m y = = = " e d g e - l a b e l " ) { o r i g L a b e l . x = n o d e . x ; o r i g L a b e l . y = n o d e . y ; o r i g L a b e l . w i d t h = n o d e . w i d t h ; o r i g L a b e l . h e i g h t = n o d e . h e i g h t } v = w ; n o d e = g . n o d e ( v ) } } ) } } , { " . / l o d a s h " : 1 0 , " . / u t i l " : 2 9 } ] , 1 3 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r _ = r e q u i r e ( " . . / l o d a s h " ) ; m o d u l e . e x p o r t s = a d d S u b g r a p h C o n s t r a i n t s ; f u n c t i o n a d d S u b g r a p h C o n s t r a i n t s ( g , c g , v s ) { v a r p r e v = { } , r o o t P r e v ; _ . f o r E a c h ( v s , f u n c t i o n ( v ) { v a r c h i l d = g . p a r e n t ( v ) , p a r e n t , p r e v C h i l d ; w h i l e ( c h i l d ) { p a r e n t = g . p a r e n t ( c h i l d ) ; i f ( p a r e n t ) { p r e v C h i l d = p r e v [ p a r e n t ] ; p r e v [ p a r e n t ] = c h i l d } e l s e { p r e v C h i l d = r o o t P r e v ; r o o t P r e v = c h i l d } i f ( p r e v C h i l d & & p r e v C h i l d ! = = c h i l d ) { c g . s e t E d g e ( p r e v C h i l d , c h i l d ) ; r e t u r n } c h i l d = p a r e n t } } ) ;
/ *
function dfs ( v ) {
var children = v ? g . children ( v ) : g . children ( ) ;
if ( children . length ) {
var min = Number . POSITIVE _INFINITY ,
subgraphs = [ ] ;
_ . each ( children , function ( child ) {
var childMin = dfs ( child ) ;
if ( g . children ( child ) . length ) {
subgraphs . push ( { v : child , order : childMin } ) ;
}
min = Math . min ( min , childMin ) ;
} ) ;
_ . reduce ( _ . sortBy ( subgraphs , "order" ) , function ( prev , curr ) {
cg . setEdge ( prev . v , curr . v ) ;
return curr ;
} ) ;
return min ;
}
return g . node ( v ) . order ;
}
dfs ( undefined ) ;
* / } } , { " . . / l o d a s h " : 1 0 } ] , 1 4 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r _ = r e q u i r e ( " . . / l o d a s h " ) ; m o d u l e . e x p o r t s = b a r y c e n t e r ; f u n c t i o n b a r y c e n t e r ( g , m o v a b l e ) { r e t u r n _ . m a p ( m o v a b l e , f u n c t i o n ( v ) { v a r i n V = g . i n E d g e s ( v ) ; i f ( ! i n V . l e n g t h ) { r e t u r n { v : v } } e l s e { v a r r e s u l t = _ . r e d u c e ( i n V , f u n c t i o n ( a c c , e ) { v a r e d g e = g . e d g e ( e ) , n o d e U = g . n o d e ( e . v ) ; r e t u r n { s u m : a c c . s u m + e d g e . w e i g h t * n o d e U . o r d e r , w e i g h t : a c c . w e i g h t + e d g e . w e i g h t } } , { s u m : 0 , w e i g h t : 0 } ) ; r e t u r n { v : v , b a r y c e n t e r : r e s u l t . s u m / r e s u l t . w e i g h t , w e i g h t : r e s u l t . w e i g h t } } } ) } } , { " . . / l o d a s h " : 1 0 } ] , 1 5 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r _ = r e q u i r e ( " . . / l o d a s h " ) ; v a r G r a p h = r e q u i r e ( " . . / g r a p h l i b " ) . G r a p h ; m o d u l e . e x p o r t s = b u i l d L a y e r G r a p h ;
/ *
* Constructs a graph that can be used to sort a layer of nodes . The graph will
* contain all base and subgraph nodes from the request layer in their original
* hierarchy and any edges that are incident on these nodes and are of the type
* requested by the "relationship" parameter .
*
* Nodes from the requested rank that do not have parents are assigned a root
* node in the output graph , which is set in the root graph attribute . This
* makes it easy to walk the hierarchy of movable nodes during ordering .
*
* Pre - conditions :
*
* 1. Input graph is a DAG
* 2. Base nodes in the input graph have a rank attribute
* 3. Subgraph nodes in the input graph has minRank and maxRank attributes
* 4. Edges have an assigned weight
*
* Post - conditions :
*
* 1. Output graph has all nodes in the movable rank with preserved
* hierarchy .
* 2. Root nodes in the movable layer are made children of the node
* indicated by the root attribute of the graph .
* 3. Non - movable nodes incident on movable nodes , selected by the
* relationship parameter , are included in the graph ( without hierarchy ) .
* 4. Edges incident on movable nodes , selected by the relationship
* parameter , are added to the output graph .
* 5. The weights for copied edges are aggregated as need , since the output
* graph is not a multi - graph .
* / f u n c t i o n b u i l d L a y e r G r a p h ( g , r a n k , r e l a t i o n s h i p ) { v a r r o o t = c r e a t e R o o t N o d e ( g ) , r e s u l t = n e w G r a p h ( { c o m p o u n d : t r u e } ) . s e t G r a p h ( { r o o t : r o o t } ) . s e t D e f a u l t N o d e L a b e l ( f u n c t i o n ( v ) { r e t u r n g . n o d e ( v ) } ) ; _ . f o r E a c h ( g . n o d e s ( ) , f u n c t i o n ( v ) { v a r n o d e = g . n o d e ( v ) , p a r e n t = g . p a r e n t ( v ) ; i f ( n o d e . r a n k = = = r a n k | | n o d e . m i n R a n k < = r a n k & & r a n k < = n o d e . m a x R a n k ) { r e s u l t . s e t N o d e ( v ) ; r e s u l t . s e t P a r e n t ( v , p a r e n t | | r o o t ) ;
// This assumes we have only short edges!
_ . forEach ( g [ relationship ] ( v ) , function ( e ) { var u = e . v === v ? e . w : e . v , edge = result . edge ( u , v ) , weight = ! _ . isUndefined ( edge ) ? edge . weight : 0 ; result . setEdge ( u , v , { weight : g . edge ( e ) . weight + weight } ) } ) ; if ( _ . has ( node , "minRank" ) ) { result . setNode ( v , { borderLeft : node . borderLeft [ rank ] , borderRight : node . borderRight [ rank ] } ) } } } ) ; return result } function createRootNode ( g ) { var v ; while ( g . hasNode ( v = _ . uniqueId ( "_root" ) ) ) ; return v } } , { "../graphlib" : 7 , "../lodash" : 10 } ] , 16 : [ function ( require , module , exports ) { "use strict" ; var _ = require ( "../lodash" ) ; module . exports = crossCount ;
/ *
* A function that takes a layering ( an array of layers , each with an array of
2022-12-26 16:47:39 +00:00
* ordered nodes ) and a graph and returns a weighted crossing count .
2022-12-03 18:54:54 +00:00
*
* Pre - conditions :
*
* 1. Input graph must be simple ( not a multigraph ) , directed , and include
* only simple edges .
* 2. Edges in the input graph must have assigned weights .
*
* Post - conditions :
*
* 1. The graph and layering matrix are left unchanged .
*
* This algorithm is derived from Barth , et al . , "Bilayer Cross Counting."
* / f u n c t i o n c r o s s C o u n t ( g , l a y e r i n g ) { v a r c c = 0 ; f o r ( v a r i = 1 ; i < l a y e r i n g . l e n g t h ; + + i ) { c c + = t w o L a y e r C r o s s C o u n t ( g , l a y e r i n g [ i - 1 ] , l a y e r i n g [ i ] ) } r e t u r n c c } f u n c t i o n t w o L a y e r C r o s s C o u n t ( g , n o r t h L a y e r , s o u t h L a y e r ) {
// Sort all of the edges between the north and south layers by their position
// in the north layer and then the south. Map these edges to the position of
// their head in the south layer.
var southPos = _ . zipObject ( southLayer , _ . map ( southLayer , function ( v , i ) { return i } ) ) ; var southEntries = _ . flatten ( _ . map ( northLayer , function ( v ) { return _ . sortBy ( _ . map ( g . outEdges ( v ) , function ( e ) { return { pos : southPos [ e . w ] , weight : g . edge ( e ) . weight } } ) , "pos" ) } ) , true ) ;
// Build the accumulator tree
var firstIndex = 1 ; while ( firstIndex < southLayer . length ) firstIndex <<= 1 ; var treeSize = 2 * firstIndex - 1 ; firstIndex -= 1 ; var tree = _ . map ( new Array ( treeSize ) , function ( ) { return 0 } ) ;
// Calculate the weighted crossings
var cc = 0 ; _ . forEach ( southEntries . forEach ( function ( entry ) { var index = entry . pos + firstIndex ; tree [ index ] += entry . weight ; var weightSum = 0 ; while ( index > 0 ) { if ( index % 2 ) { weightSum += tree [ index + 1 ] } index = index - 1 >> 1 ; tree [ index ] += entry . weight } cc += entry . weight * weightSum } ) ) ; return cc } } , { "../lodash" : 10 } ] , 17 : [ function ( require , module , exports ) { "use strict" ; var _ = require ( "../lodash" ) ; var initOrder = require ( "./init-order" ) ; var crossCount = require ( "./cross-count" ) ; var sortSubgraph = require ( "./sort-subgraph" ) ; var buildLayerGraph = require ( "./build-layer-graph" ) ; var addSubgraphConstraints = require ( "./add-subgraph-constraints" ) ; var Graph = require ( "../graphlib" ) . Graph ; var util = require ( "../util" ) ; module . exports = order ;
/ *
* Applies heuristics to minimize edge crossings in the graph and sets the best
* order solution as an order attribute on each node .
*
* Pre - conditions :
*
* 1. Graph must be DAG
* 2. Graph nodes must be objects with a "rank" attribute
* 3. Graph edges must have the "weight" attribute
*
* Post - conditions :
*
* 1. Graph nodes will have an "order" attribute based on the results of the
* algorithm .
* / f u n c t i o n o r d e r ( g ) { v a r m a x R a n k = u t i l . m a x R a n k ( g ) , d o w n L a y e r G r a p h s = b u i l d L a y e r G r a p h s ( g , _ . r a n g e ( 1 , m a x R a n k + 1 ) , " i n E d g e s " ) , u p L a y e r G r a p h s = b u i l d L a y e r G r a p h s ( g , _ . r a n g e ( m a x R a n k - 1 , - 1 , - 1 ) , " o u t E d g e s " ) ; v a r l a y e r i n g = i n i t O r d e r ( g ) ; a s s i g n O r d e r ( g , l a y e r i n g ) ; v a r b e s t C C = N u m b e r . P O S I T I V E _ I N F I N I T Y , b e s t ; f o r ( v a r i = 0 , l a s t B e s t = 0 ; l a s t B e s t < 4 ; + + i , + + l a s t B e s t ) { s w e e p L a y e r G r a p h s ( i % 2 ? d o w n L a y e r G r a p h s : u p L a y e r G r a p h s , i % 4 > = 2 ) ; l a y e r i n g = u t i l . b u i l d L a y e r M a t r i x ( g ) ; v a r c c = c r o s s C o u n t ( g , l a y e r i n g ) ; i f ( c c < b e s t C C ) { l a s t B e s t = 0 ; b e s t = _ . c l o n e D e e p ( l a y e r i n g ) ; b e s t C C = c c } } a s s i g n O r d e r ( g , b e s t ) } f u n c t i o n b u i l d L a y e r G r a p h s ( g , r a n k s , r e l a t i o n s h i p ) { r e t u r n _ . m a p ( r a n k s , f u n c t i o n ( r a n k ) { r e t u r n b u i l d L a y e r G r a p h ( g , r a n k , r e l a t i o n s h i p ) } ) } f u n c t i o n s w e e p L a y e r G r a p h s ( l a y e r G r a p h s , b i a s R i g h t ) { v a r c g = n e w G r a p h ; _ . f o r E a c h ( l a y e r G r a p h s , f u n c t i o n ( l g ) { v a r r o o t = l g . g r a p h ( ) . r o o t ; v a r s o r t e d = s o r t S u b g r a p h ( l g , r o o t , c g , b i a s R i g h t ) ; _ . f o r E a c h ( s o r t e d . v s , f u n c t i o n ( v , i ) { l g . n o d e ( v ) . o r d e r = i } ) ; a d d S u b g r a p h C o n s t r a i n t s ( l g , c g , s o r t e d . v s ) } ) } f u n c t i o n a s s i g n O r d e r ( g , l a y e r i n g ) { _ . f o r E a c h ( l a y e r i n g , f u n c t i o n ( l a y e r ) { _ . f o r E a c h ( l a y e r , f u n c t i o n ( v , i ) { g . n o d e ( v ) . o r d e r = i } ) } ) } } , { " . . / g r a p h l i b " : 7 , " . . / l o d a s h " : 1 0 , " . . / u t i l " : 2 9 , " . / a d d - s u b g r a p h - c o n s t r a i n t s " : 1 3 , " . / b u i l d - l a y e r - g r a p h " : 1 5 , " . / c r o s s - c o u n t " : 1 6 , " . / i n i t - o r d e r " : 1 8 , " . / s o r t - s u b g r a p h " : 2 0 } ] , 1 8 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { " u s e s t r i c t " ; v a r _ = r e q u i r e ( " . . / l o d a s h " ) ; m o d u l e . e x p o r t s = i n i t O r d e r ;
/ *
* Assigns an initial order value for each node by performing a DFS search
* starting from nodes in the first rank . Nodes are assigned an order in their
* rank as they are first visited .
*
* This approach comes from Gansner , et al . , " A Technique for Drawing Directed
* Graphs . "
*
* Returns a layering matrix with an array per layer and each layer sorted by
* the order of its nodes .
* / f u n c t i o n i n i t O r d e r ( g ) { v a r v i s i t e d = { } ; v a r s i m p l e N o d e s = _ . f i l t e r ( g . n o d e s ( ) , f u n c t i o n ( v ) { r e t u r n ! g . c h i l d r e n ( v ) . l e n g t h } ) ; v a r m a x R a n k = _ . m a x ( _ . m a p ( s i m p l e N o d e s , f u n c t i o n ( v ) { r e t u r n g . n o d e ( v ) . r a n k } ) ) ; v a r l a y e r s = _ . m a p ( _ . r a n g e ( m a x R a n k + 1 ) , f u n c t i o n ( ) { r e t u r n [ ] } ) ; f u n c t i o n d f s ( v ) { i f ( _ . h a s ( v i s i t e d , v ) ) r e t u r n ; v i s i t e d [ v ] = t r u e ; v a r n o d e = g . n o d e ( v ) ; l a y e r s [ n o d e . r a n k ] . p u s h ( v ) ; _ . f o r E a c h ( g . s u c c e s s o r s ( v ) , d f s ) } v a r o r d e r e d V s = _ . s o r t B y ( s i m p l e N o d e s , f u n c t i o n ( v ) { r e t u r n g . n o d e ( v ) . r a n k } ) ; _ . f o r E a c h ( o r d e r e d V s , d f s ) ; r e t u r n l a y e r s } } , { " . . / l o d a s h " : 1 0 } ] , 1 9 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { " u s e s t r i c t " ; v a r _ = r e q u i r e ( " . . / l o d a s h " ) ; m o d u l e . e x p o r t s = r e s o l v e C o n f l i c t s ;
/ *
* Given a list of entries of the form { v , barycenter , weight } and a
* constraint graph this function will resolve any conflicts between the
* constraint graph and the barycenters for the entries . If the barycenters for
* an entry would violate a constraint in the constraint graph then we coalesce
2022-12-26 16:47:39 +00:00
* the nodes in the conflict into a new node that respects the constraint and
2022-12-03 18:54:54 +00:00
* aggregates barycenter and weight information .
*
* This implementation is based on the description in Forster , " A Fast and
2022-12-26 16:47:39 +00:00
* Simple Heuristic for Constrained Two - Level Crossing Reduction , " though it
2022-12-03 18:54:54 +00:00
* differs in some specific details .
*
* Pre - conditions :
*
* 1. Each entry has the form { v , barycenter , weight } , or if the node has
* no barycenter , then { v } .
*
* Returns :
*
* A new list of entries of the form { vs , i , barycenter , weight } . The list
* ` vs ` may either be a singleton or it may be an aggregation of nodes
* ordered such that they do not violate constraints from the constraint
* graph . The property ` i ` is the lowest original index of any of the
* elements in ` vs ` .
* / f u n c t i o n r e s o l v e C o n f l i c t s ( e n t r i e s , c g ) { v a r m a p p e d E n t r i e s = { } ; _ . f o r E a c h ( e n t r i e s , f u n c t i o n ( e n t r y , i ) { v a r t m p = m a p p e d E n t r i e s [ e n t r y . v ] = { i n d e g r e e : 0 , i n : [ ] , o u t : [ ] , v s : [ e n t r y . v ] , i : i } ; i f ( ! _ . i s U n d e f i n e d ( e n t r y . b a r y c e n t e r ) ) { t m p . b a r y c e n t e r = e n t r y . b a r y c e n t e r ; t m p . w e i g h t = e n t r y . w e i g h t } } ) ; _ . f o r E a c h ( c g . e d g e s ( ) , f u n c t i o n ( e ) { v a r e n t r y V = m a p p e d E n t r i e s [ e . v ] ; v a r e n t r y W = m a p p e d E n t r i e s [ e . w ] ; i f ( ! _ . i s U n d e f i n e d ( e n t r y V ) & & ! _ . i s U n d e f i n e d ( e n t r y W ) ) { e n t r y W . i n d e g r e e + + ; e n t r y V . o u t . p u s h ( m a p p e d E n t r i e s [ e . w ] ) } } ) ; v a r s o u r c e S e t = _ . f i l t e r ( m a p p e d E n t r i e s , f u n c t i o n ( e n t r y ) { r e t u r n ! e n t r y . i n d e g r e e } ) ; r e t u r n d o R e s o l v e C o n f l i c t s ( s o u r c e S e t ) } f u n c t i o n d o R e s o l v e C o n f l i c t s ( s o u r c e S e t ) { v a r e n t r i e s = [ ] ; f u n c t i o n h a n d l e I n ( v E n t r y ) { r e t u r n f u n c t i o n ( u E n t r y ) { i f ( u E n t r y . m e r g e d ) { r e t u r n } i f ( _ . i s U n d e f i n e d ( u E n t r y . b a r y c e n t e r ) | | _ . i s U n d e f i n e d ( v E n t r y . b a r y c e n t e r ) | | u E n t r y . b a r y c e n t e r > = v E n t r y . b a r y c e n t e r ) { m e r g e E n t r i e s ( v E n t r y , u E n t r y ) } } } f u n c t i o n h a n d l e O u t ( v E n t r y ) { r e t u r n f u n c t i o n ( w E n t r y ) { w E n t r y [ " i n " ] . p u s h ( v E n t r y ) ; i f ( - - w E n t r y . i n d e g r e e = = = 0 ) { s o u r c e S e t . p u s h ( w E n t r y ) } } } w h i l e ( s o u r c e S e t . l e n g t h ) { v a r e n t r y = s o u r c e S e t . p o p ( ) ; e n t r i e s . p u s h ( e n t r y ) ; _ . f o r E a c h ( e n t r y [ " i n " ] . r e v e r s e ( ) , h a n d l e I n ( e n t r y ) ) ; _ . f o r E a c h ( e n t r y . o u t , h a n d l e O u t ( e n t r y ) ) } r e t u r n _ . m a p ( _ . f i l t e r ( e n t r i e s , f u n c t i o n ( e n t r y ) { r e t u r n ! e n t r y . m e r g e d } ) , f u n c t i o n ( e n t r y ) { r e t u r n _ . p i c k ( e n t r y , [ " v s " , " i " , " b a r y c e n t e r " , " w e i g h t " ] ) } ) } f u n c t i o n m e r g e E n t r i e s ( t a r g e t , s o u r c e ) { v a r s u m = 0 ; v a r w e i g h t = 0 ; i f ( t a r g e t . w e i g h t ) { s u m + = t a r g e t . b a r y c e n t e r * t a r g e t . w e i g h t ; w e i g h t + = t a r g e t . w e i g h t } i f ( s o u r c e . w e i g h t ) { s u m + = s o u r c e . b a r y c e n t e r * s o u r c e . w e i g h t ; w e i g h t + = s o u r c e . w e i g h t } t a r g e t . v s = s o u r c e . v s . c o n c a t ( t a r g e t . v s ) ; t a r g e t . b a r y c e n t e r = s u m / w e i g h t ; t a r g e t . w e i g h t = w e i g h t ; t a r g e t . i = M a t h . m i n ( s o u r c e . i , t a r g e t . i ) ; s o u r c e . m e r g e d = t r u e } } , { " . . / l o d a s h " : 1 0 } ] , 2 0 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r _ = r e q u i r e ( " . . / l o d a s h " ) ; v a r b a r y c e n t e r = r e q u i r e ( " . / b a r y c e n t e r " ) ; v a r r e s o l v e C o n f l i c t s = r e q u i r e ( " . / r e s o l v e - c o n f l i c t s " ) ; v a r s o r t = r e q u i r e ( " . / s o r t " ) ; m o d u l e . e x p o r t s = s o r t S u b g r a p h ; f u n c t i o n s o r t S u b g r a p h ( g , v , c g , b i a s R i g h t ) { v a r m o v a b l e = g . c h i l d r e n ( v ) ; v a r n o d e = g . n o d e ( v ) ; v a r b l = n o d e ? n o d e . b o r d e r L e f t : u n d e f i n e d ; v a r b r = n o d e ? n o d e . b o r d e r R i g h t : u n d e f i n e d ; v a r s u b g r a p h s = { } ; i f ( b l ) { m o v a b l e = _ . f i l t e r ( m o v a b l e , f u n c t i o n ( w ) { r e t u r n w ! = = b l & & w ! = = b r } ) } v a r b a r y c e n t e r s = b a r y c e n t e r ( g , m o v a b l e ) ; _ . f o r E a c h ( b a r y c e n t e r s , f u n c t i o n ( e n t r y ) { i f ( g . c h i l d r e n ( e n t r y . v ) . l e n g t h ) { v a r s u b g r a p h R e s u l t = s o r t S u b g r a p h ( g , e n t r y . v , c g , b i a s R i g h t ) ; s u b g r a p h s [ e n t r y . v ] = s u b g r a p h R e s u l t ; i f ( _ . h a s ( s u b g r a p h R e s u l t , " b a r y c e n t e r " ) ) { m e r g e B a r y c e n t e r s ( e n t r y , s u b g r a p h R e s u l t ) } } } ) ; v a r e n t r i e s = r e s o l v e C o n f l i c t s ( b a r y c e n t e r s , c g ) ; e x p a n d S u b g r a p h s ( e n t r i e s , s u b g r a p h s ) ; v a r r e s u l t = s o r t ( e n t r i e s , b i a s R i g h t ) ; i f ( b l ) { r e s u l t . v s = _ . f l a t t e n ( [ b l , r e s u l t . v s , b r ] , t r u e ) ; i f ( g . p r e d e c e s s o r s ( b l ) . l e n g t h ) { v a r b l P r e d = g . n o d e ( g . p r e d e c e s s o r s ( b l ) [ 0 ] ) , b r P r e d = g . n o d e ( g . p r e d e c e s s o r s ( b r ) [ 0 ] ) ; i f ( ! _ . h a s ( r e s u l t , " b a r y c e n t e r " ) ) { r e s u l t . b a r y c e n t e r = 0 ; r e s u l t . w e i g h t = 0 } r e s u l t . b a r y c e n t e r = ( r e s u l t . b a r y c e n t e r * r e s u l t . w e i g h t + b l P r e d . o r d e r + b r P r e d . o r d e r ) / ( r e s u l t . w e i g h t + 2 ) ; r e s u l t . w e i g h t + = 2 } } r e t u r n r e s u l t } f u n c t i o n e x p a n d S u b g r a p h s ( e n t r i e s , s u b g r a p h s ) { _ . f o r E a c h ( e n t r i e s , f u n c t i o n ( e n t r y ) { e n t r y . v s = _ . f l a t t e n ( e n t r y . v s . m a p ( f u n c t i o n ( v ) { i f ( s u b g r a p h s [ v ] ) { r e t u r n s u b g r a p h s [ v ] . v s } r e t u r n v } ) , t r u e ) } ) } f u n c t i o n m e r g e B a r y c e n t e r s ( t a r g e t , o t h e r ) { i f ( ! _ . i s U n d e f i n e d ( t a r g e t . b a r y c e n t e r ) ) { t a r g e t . b a r y c e n t e r = ( t a r g e t . b a r y c e n t e r * t a r g e t . w e i g h t + o t h e r . b a r y c e n t e r * o t h e r . w e i g h t ) / ( t a r g e t . w e i g h t + o t h e r . w e i g h t ) ; t a r g e t . w e i g h t + = o t h e r . w e i g h t } e l s e { t a r g e t . b a r y c e n t e r = o t h e r . b a r y c e n t e r ; t a r g e t . w e i g h t = o t h e r . w e i g h t } } } , { " . . / l o d a s h " : 1 0 , " . / b a r y c e n t e r " : 1 4 , " . / r e s o l v e - c o n f l i c t s " : 1 9 , " . / s o r t " : 2 1 } ] , 2 1 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r _ = r e q u i r e ( " . . / l o d a s h " ) ; v a r u t i l = r e q u i r e ( " . . / u t i l " ) ; m o d u l e . e x p o r t s = s o r t ; f u n c t i o n s o r t ( e n t r i e s , b i a s R i g h t ) { v a r p a r t s = u t i l . p a r t i t i o n ( e n t r i e s , f u n c t i o n ( e n t r y ) { r e t u r n _ . h a s ( e n t r y , " b a r y c e n t e r " ) } ) ; v a r s o r t a b l e = p a r t s . l h s , u n s o r t a b l e = _ . s o r t B y ( p a r t s . r h s , f u n c t i o n ( e n t r y ) { r e t u r n - e n t r y . i } ) , v s = [ ] , s u m = 0 , w e i g h t = 0 , v s I n d e x = 0 ; s o r t a b l e . s o r t ( c o m p a r e W i t h B i a s ( ! ! b i a s R i g h t ) ) ; v s I n d e x = c o n s u m e U n s o r t a b l e ( v s , u n s o r t a b l e , v s I n d e x ) ; _ . f o r E a c h ( s o r t a b l e , f u n c t i o n ( e n t r y ) { v s I n d e x + = e n t r y . v s . l e n g t h ; v s . p u s h ( e n t r y . v s ) ; s u m + = e n t r y . b a r y c e n t e r * e n t r y . w e i g h t ; w e i g h t + = e n t r y . w e i g h t ; v s I n d e x = c o n s u m e U n s o r t a b l e ( v s , u n s o r t a b l e , v s I n d e x ) } ) ; v a r r e s u l t = { v s : _ . f l a t t e n ( v s , t r u e ) } ; i f ( w e i g h t ) { r e s u l t . b a r y c e n t e r = s u m / w e
// Find a path from v to w through the lowest common ancestor (LCA). Return the
// full path and the LCA.
function findPath ( g , postorderNums , v , w ) { var vPath = [ ] ; var wPath = [ ] ; var low = Math . min ( postorderNums [ v ] . low , postorderNums [ w ] . low ) ; var lim = Math . max ( postorderNums [ v ] . lim , postorderNums [ w ] . lim ) ; var parent ; var lca ;
// Traverse up from v to find the LCA
parent = v ; do { parent = g . parent ( parent ) ; vPath . push ( parent ) } while ( parent && ( postorderNums [ parent ] . low > low || lim > postorderNums [ parent ] . lim ) ) ; lca = parent ;
// Traverse from w to LCA
parent = w ; while ( ( parent = g . parent ( parent ) ) !== lca ) { wPath . push ( parent ) } return { path : vPath . concat ( wPath . reverse ( ) ) , lca : lca } } function postorder ( g ) { var result = { } ; var lim = 0 ; function dfs ( v ) { var low = lim ; _ . forEach ( g . children ( v ) , dfs ) ; result [ v ] = { low : low , lim : lim ++ } } _ . forEach ( g . children ( ) , dfs ) ; return result } } , { "./lodash" : 10 } ] , 23 : [ function ( require , module , exports ) { "use strict" ; var _ = require ( "../lodash" ) ; var Graph = require ( "../graphlib" ) . Graph ; var util = require ( "../util" ) ;
/ *
* This module provides coordinate assignment based on Brandes and Köpf , " Fast
* and Simple Horizontal Coordinate Assignment . "
* / m o d u l e . e x p o r t s = { p o s i t i o n X : p o s i t i o n X , f i n d T y p e 1 C o n f l i c t s : f i n d T y p e 1 C o n f l i c t s , f i n d T y p e 2 C o n f l i c t s : f i n d T y p e 2 C o n f l i c t s , a d d C o n f l i c t : a d d C o n f l i c t , h a s C o n f l i c t : h a s C o n f l i c t , v e r t i c a l A l i g n m e n t : v e r t i c a l A l i g n m e n t , h o r i z o n t a l C o m p a c t i o n : h o r i z o n t a l C o m p a c t i o n , a l i g n C o o r d i n a t e s : a l i g n C o o r d i n a t e s , f i n d S m a l l e s t W i d t h A l i g n m e n t : f i n d S m a l l e s t W i d t h A l i g n m e n t , b a l a n c e : b a l a n c e } ;
/ *
* Marks all edges in the graph with a type - 1 conflict with the "type1Conflict"
* property . A type - 1 conflict is one where a non - inner segment crosses an
* inner segment . An inner segment is an edge with both incident nodes marked
* with the "dummy" property .
*
* This algorithm scans layer by layer , starting with the second , for type - 1
* conflicts between the current layer and the previous layer . For each layer
* it scans the nodes from left to right until it reaches one that is incident
* on an inner segment . It then scans predecessors to determine if they have
* edges that cross that inner segment . At the end a final scan is done for all
* nodes on the current rank to see if they cross the last visited inner
* segment .
*
* This algorithm ( safely ) assumes that a dummy node will only be incident on a
* single node in the layers being scanned .
* / f u n c t i o n f i n d T y p e 1 C o n f l i c t s ( g , l a y e r i n g ) { v a r c o n f l i c t s = { } ; f u n c t i o n v i s i t L a y e r ( p r e v L a y e r , l a y e r ) { v a r
// last visited node in the previous layer that is incident on an inner
// segment.
k0 = 0 ,
// Tracks the last node in this layer scanned for crossings with a type-1
// segment.
scanPos = 0 , prevLayerLength = prevLayer . length , lastNode = _ . last ( layer ) ; _ . forEach ( layer , function ( v , i ) { var w = findOtherInnerSegmentNode ( g , v ) , k1 = w ? g . node ( w ) . order : prevLayerLength ; if ( w || v === lastNode ) { _ . forEach ( layer . slice ( scanPos , i + 1 ) , function ( scanNode ) { _ . forEach ( g . predecessors ( scanNode ) , function ( u ) { var uLabel = g . node ( u ) , uPos = uLabel . order ; if ( ( uPos < k0 || k1 < uPos ) && ! ( uLabel . dummy && g . node ( scanNode ) . dummy ) ) { addConflict ( conflicts , u , scanNode ) } } ) } ) ; scanPos = i + 1 ; k0 = k1 } } ) ; return layer } _ . reduce ( layering , visitLayer ) ; return conflicts } function findType2Conflicts ( g , layering ) { var conflicts = { } ; function scan ( south , southPos , southEnd , prevNorthBorder , nextNorthBorder ) { var v ; _ . forEach ( _ . range ( southPos , southEnd ) , function ( i ) { v = south [ i ] ; if ( g . node ( v ) . dummy ) { _ . forEach ( g . predecessors ( v ) , function ( u ) { var uNode = g . node ( u ) ; if ( uNode . dummy && ( uNode . order < prevNorthBorder || uNode . order > nextNorthBorder ) ) { addConflict ( conflicts , u , v ) } } ) } } ) } function visitLayer ( north , south ) { var prevNorthPos = - 1 , nextNorthPos , southPos = 0 ; _ . forEach ( south , function ( v , southLookahead ) { if ( g . node ( v ) . dummy === "border" ) { var predecessors = g . predecessors ( v ) ; if ( predecessors . length ) { nextNorthPos = g . node ( predecessors [ 0 ] ) . order ; scan ( south , southPos , southLookahead , prevNorthPos , nextNorthPos ) ; southPos = southLookahead ; prevNorthPos = nextNorthPos } } scan ( south , southPos , south . length , nextNorthPos , north . length ) } ) ; return south } _ . reduce ( layering , visitLayer ) ; return conflicts } function findOtherInnerSegmentNode ( g , v ) { if ( g . node ( v ) . dummy ) { return _ . find ( g . predecessors ( v ) , function ( u ) { return g . node ( u ) . dummy } ) } } function addConflict ( conflicts , v , w ) { if ( v > w ) { var tmp = v ; v = w ; w = tmp } var conflictsV = conflicts [ v ] ; if ( ! conflictsV ) { conflicts [ v ] = conflictsV = { } } conflictsV [ w ] = true } function hasConflict ( conflicts , v , w ) { if ( v > w ) { var tmp = v ; v = w ; w = tmp } return _ . has ( conflicts [ v ] , w ) }
/ *
* Try to align nodes into vertical "blocks" where possible . This algorithm
* attempts to align a node with one of its median neighbors . If the edge
* connecting a neighbor is a type - 1 conflict then we ignore that possibility .
* If a previous node has already formed a block with a node after the node
* we ' re trying to form a block with , we also ignore that possibility - our
* blocks would be split in that scenario .
* / f u n c t i o n v e r t i c a l A l i g n m e n t ( g , l a y e r i n g , c o n f l i c t s , n e i g h b o r F n ) { v a r r o o t = { } , a l i g n = { } , p o s = { } ;
// We cache the position here based on the layering because the graph and
// layering may be out of sync. The layering matrix is manipulated to
// generate different extreme alignments.
_ . forEach ( layering , function ( layer ) { _ . forEach ( layer , function ( v , order ) { root [ v ] = v ; align [ v ] = v ; pos [ v ] = order } ) } ) ; _ . forEach ( layering , function ( layer ) { var prevIdx = - 1 ; _ . forEach ( layer , function ( v ) { var ws = neighborFn ( v ) ; if ( ws . length ) { ws = _ . sortBy ( ws , function ( w ) { return pos [ w ] } ) ; var mp = ( ws . length - 1 ) / 2 ; for ( var i = Math . floor ( mp ) , il = Math . ceil ( mp ) ; i <= il ; ++ i ) { var w = ws [ i ] ; if ( align [ v ] === v && prevIdx < pos [ w ] && ! hasConflict ( conflicts , v , w ) ) { align [ w ] = v ; align [ v ] = root [ v ] = root [ w ] ; prevIdx = pos [ w ] } } } } ) } ) ; return { root : root , align : align } } function horizontalCompaction ( g , layering , root , align , reverseSep ) {
// This portion of the algorithm differs from BK due to a number of problems.
// Instead of their algorithm we construct a new block graph and do two
// sweeps. The first sweep places blocks with the smallest possible
// coordinates. The second sweep removes unused space by moving blocks to the
// greatest coordinates without violating separation.
var xs = { } , blockG = buildBlockGraph ( g , layering , root , reverseSep ) , borderType = reverseSep ? "borderLeft" : "borderRight" ; function iterate ( setXsFunc , nextNodesFunc ) { var stack = blockG . nodes ( ) ; var elem = stack . pop ( ) ; var visited = { } ; while ( elem ) { if ( visited [ elem ] ) { setXsFunc ( elem ) } else { visited [ elem ] = true ; stack . push ( elem ) ; stack = stack . concat ( nextNodesFunc ( elem ) ) } elem = stack . pop ( ) } }
// First pass, assign smallest coordinates
function pass1 ( elem ) { xs [ elem ] = blockG . inEdges ( elem ) . reduce ( function ( acc , e ) { return Math . max ( acc , xs [ e . v ] + blockG . edge ( e ) ) } , 0 ) }
// Second pass, assign greatest coordinates
function pass2 ( elem ) { var min = blockG . outEdges ( elem ) . reduce ( function ( acc , e ) { return Math . min ( acc , xs [ e . w ] - blockG . edge ( e ) ) } , Number . POSITIVE _INFINITY ) ; var node = g . node ( elem ) ; if ( min !== Number . POSITIVE _INFINITY && node . borderType !== borderType ) { xs [ elem ] = Math . max ( xs [ elem ] , min ) } } iterate ( pass1 , blockG . predecessors . bind ( blockG ) ) ; iterate ( pass2 , blockG . successors . bind ( blockG ) ) ;
// Assign x coordinates to all nodes
_ . forEach ( align , function ( v ) { xs [ v ] = xs [ root [ v ] ] } ) ; return xs } function buildBlockGraph ( g , layering , root , reverseSep ) { var blockGraph = new Graph , graphLabel = g . graph ( ) , sepFn = sep ( graphLabel . nodesep , graphLabel . edgesep , reverseSep ) ; _ . forEach ( layering , function ( layer ) { var u ; _ . forEach ( layer , function ( v ) { var vRoot = root [ v ] ; blockGraph . setNode ( vRoot ) ; if ( u ) { var uRoot = root [ u ] , prevMax = blockGraph . edge ( uRoot , vRoot ) ; blockGraph . setEdge ( uRoot , vRoot , Math . max ( sepFn ( g , v , u ) , prevMax || 0 ) ) } u = v } ) } ) ; return blockGraph }
/ *
* Returns the alignment that has the smallest width of the given alignments .
* / f u n c t i o n f i n d S m a l l e s t W i d t h A l i g n m e n t ( g , x s s ) { r e t u r n _ . m i n B y ( _ . v a l u e s ( x s s ) , f u n c t i o n ( x s ) { v a r m a x = N u m b e r . N E G A T I V E _ I N F I N I T Y ; v a r m i n = N u m b e r . P O S I T I V E _ I N F I N I T Y ; _ . f o r I n ( x s , f u n c t i o n ( x , v ) { v a r h a l f W i d t h = w i d t h ( g , v ) / 2 ; m a x = M a t h . m a x ( x + h a l f W i d t h , m a x ) ; m i n = M a t h . m i n ( x - h a l f W i d t h , m i n ) } ) ; r e t u r n m a x - m i n } ) }
/ *
* Align the coordinates of each of the layout alignments such that
* left - biased alignments have their minimum coordinate at the same point as
* the minimum coordinate of the smallest width alignment and right - biased
* alignments have their maximum coordinate at the same point as the maximum
* coordinate of the smallest width alignment .
* / f u n c t i o n a l i g n C o o r d i n a t e s ( x s s , a l i g n T o ) { v a r a l i g n T o V a l s = _ . v a l u e s ( a l i g n T o ) , a l i g n T o M i n = _ . m i n ( a l i g n T o V a l s ) , a l i g n T o M a x = _ . m a x ( a l i g n T o V a l s ) ; _ . f o r E a c h ( [ " u " , " d " ] , f u n c t i o n ( v e r t ) { _ . f o r E a c h ( [ " l " , " r " ] , f u n c t i o n ( h o r i z ) { v a r a l i g n m e n t = v e r t + h o r i z , x s = x s s [ a l i g n m e n t ] , d e l t a ; i f ( x s = = = a l i g n T o ) r e t u r n ; v a r x s V a l s = _ . v a l u e s ( x s ) ; d e l t a = h o r i z = = = " l " ? a l i g n T o M i n - _ . m i n ( x s V a l s ) : a l i g n T o M a x - _ . m a x ( x s V a l s ) ; i f ( d e l t a ) { x s s [ a l i g n m e n t ] = _ . m a p V a l u e s ( x s , f u n c t i o n ( x ) { r e t u r n x + d e l t a } ) } } ) } ) } f u n c t i o n b a l a n c e ( x s s , a l i g n ) { r e t u r n _ . m a p V a l u e s ( x s s . u l , f u n c t i o n ( i g n o r e , v ) { i f ( a l i g n ) { r e t u r n x s s [ a l i g n . t o L o w e r C a s e ( ) ] [ v ] } e l s e { v a r x s = _ . s o r t B y ( _ . m a p ( x s s , v ) ) ; r e t u r n ( x s [ 1 ] + x s [ 2 ] ) / 2 } } ) } f u n c t i o n p o s i t i o n X ( g ) { v a r l a y e r i n g = u t i l . b u i l d L a y e r M a t r i x ( g ) ; v a r c o n f l i c t s = _ . m e r g e ( f i n d T y p e 1 C o n f l i c t s ( g , l a y e r i n g ) , f i n d T y p e 2 C o n f l i c t s ( g , l a y e r i n g ) ) ; v a r x s s = { } ; v a r a d j u s t e d L a y e r i n g ; _ . f o r E a c h ( [ " u " , " d " ] , f u n c t i o n ( v e r t ) { a d j u s t e d L a y e r i n g = v e r t = = = " u " ? l a y e r i n g : _ . v a l u e s ( l a y e r i n g ) . r e v e r s e ( ) ; _ . f o r E a c h ( [ " l " , " r " ] , f u n c t i o n ( h o r i z ) { i f ( h o r i z = = = " r " ) { a d j u s t e d L a y e r i n g = _ . m a p ( a d j u s t e d L a y e r i n g , f u n c t i o n ( i n n e r ) { r e t u r n _ . v a l u e s ( i n n e r ) . r e v e r s e ( ) } ) } v a r n e i g h b o r F n = ( v e r t = = = " u " ? g . p r e d e c e s s o r s : g . s u c c e s s o r s ) . b i n d ( g ) ; v a r a l i g n = v e r t i c a l A l i g n m e n t ( g , a d j u s t e d L a y e r i n g , c o n f l i c t s , n e i g h b o r F n ) ; v a r x s = h o r i z o n t a l C o m p a c t i o n ( g , a d j u s t e d L a y e r i n g , a l i g n . r o o t , a l i g n . a l i g n , h o r i z = = = " r " ) ; i f ( h o r i z = = = " r " ) { x s = _ . m a p V a l u e s ( x s , f u n c t i o n ( x ) { r e t u r n - x } ) } x s s [ v e r t + h o r i z ] = x s } ) } ) ; v a r s m a l l e s t W i d t h = f i n d S m a l l e s t W i d t h A l i g n m e n t ( g , x s s ) ; a l i g n C o o r d i n a t e s ( x s s , s m a l l e s t W i d t h ) ; r e t u r n b a l a n c e ( x s s , g . g r a p h ( ) . a l i g n ) } f u n c t i o n s e p ( n o d e S e p , e d g e S e p , r e v e r s e S e p ) { r e t u r n f u n c t i o n ( g , v , w ) { v a r v L a b e l = g . n o d e ( v ) ; v a r w L a b e l = g . n o d e ( w ) ; v a r s u m = 0 ; v a r d e l t a ; s u m + = v L a b e l . w i d t h / 2 ; i f ( _ . h a s ( v L a b e l , " l a b e l p o s " ) ) { s w i t c h ( v L a b e l . l a b e l p o s . t o L o w e r C a s e ( ) ) { c a s e " l " : d e l t a = - v L a b e l . w i d t h / 2 ; b r e a k ; c a s e " r " : d e l t a = v L a b e l . w i d t h / 2 ; b r e a k } } i f ( d e l t a ) { s u m + = r e v e r s e S e p ? d e l t a : - d e l t a } d e l t a = 0 ; s u m + = ( v L a b e l . d u m m y ? e d g e S e p : n o d e S e p ) / 2 ; s u m + = ( w L a b e l . d u m m y ? e d g e S e p : n o d e S e p ) / 2 ; s u m + = w L a b e l . w i d t h / 2 ; i f ( _ . h a s ( w L a b e l , " l a b e l p o s " ) ) { s w i t c h ( w L a b e l . l a b e l p o s . t o L o w e r C a s e ( ) ) { c a s e " l " : d e l t a = w L a b e l . w i d t h / 2 ; b r e a k ; c a s e " r " : d e l t a = - w L a b e l . w i d t h / 2 ; b r e a k } } i f ( d e l t a ) { s u m + = r e v e r s e S e p ? d e l t a : - d e l t a } d e l t a = 0 ; r e t u r n s u m } } f u n c t i o n w i d t h ( g , v ) { r e t u r n g . n o d e ( v ) . w i d t h } } , { " . . / g r a p h l i b " : 7 , " . . / l o d a s h " : 1 0 , " . . / u t i l " : 2 9 } ] , 2 4 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { " u s e s t r i c t " ; v a r _ = r e q u i r e ( " . . / l o d a s h " ) ; v a r u t i l = r e q u i r e ( " . . / u t i l " ) ; v a r p o s i t i o n X = r e q u i r e ( " . / b k " ) . p o s i t i o n X ; m o d u l e . e x p o r t s = p o s i t i o n ; f u n c t i o n p o s i t i o n ( g ) { g = u t i l . a s N o n C o m p o u n d G r a p h ( g ) ; p o s i t i o n Y ( g ) ; _ . f o r E a c h ( p o s i t i o n X ( g ) , f u n c t i o n ( x , v ) { g . n o d e ( v ) . x = x } ) } f u n c t i o n p o s i t i o n Y ( g ) { v a r l a y e r i n g = u t i l . b u i l d L a y e r M a t r i x ( g ) ; v a r r a n k S e p = g . g r a p h ( ) . r a n k s e p ; v a r p r e v Y = 0 ; _ . f o r E a c h ( l a y e r i n g , f u n c t i o n ( l a y e r ) { v a r m a x H e i g h t = _ . m a x ( _ . m a p ( l a y e r , f u n c t i o n ( v ) { r e t u r n g . n o d e ( v ) . h e i g h t } ) ) ; _ . f o r E a c h ( l a y e r , f u n c t i o n ( v ) { g . n o d e ( v ) . y = p r e v Y + m a x H e i g h t / 2 } ) ; p r e v Y + = m a x H e i g h t + r a n k S e p } ) } } , { " . . / l o d a s h " : 1 0 , " . . / u t i l " : 2 9 , " . / b k " : 2 3 } ] , 2 5 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { " u s e s t r i c t " ; v a r _ = r e q u i r e ( " . . / l o d a s h " ) ; v a r G r a p h = r e q u i r e ( " . . / g r a p h l i b " ) . G r a p h ; v a r s l a c k = r e q u i r e ( " . / u t i l " ) . s l a c k ; m o d u l e . e x p o r t s = f e a s i b l e T r e e ;
/ *
* Constructs a spanning tree with tight edges and adjusted the input node ' s
* ranks to achieve this . A tight edge is one that is has a length that matches
* its "minlen" attribute .
*
* The basic structure for this function is derived from Gansner , et al . , " A
* Technique for Drawing Directed Graphs . "
*
* Pre - conditions :
*
* 1. Graph must be a DAG .
* 2. Graph must be connected .
* 3. Graph must have at least one node .
* 5. Graph nodes must have been previously assigned a "rank" property that
* respects the "minlen" property of incident edges .
* 6. Graph edges must have a "minlen" property .
*
* Post - conditions :
*
* - Graph nodes will have their rank adjusted to ensure that all edges are
* tight .
*
* Returns a tree ( undirected graph ) that is constructed using only "tight"
* edges .
* / f u n c t i o n f e a s i b l e T r e e ( g ) { v a r t = n e w G r a p h ( { d i r e c t e d : f a l s e } ) ;
// Choose arbitrary node from which to start our tree
var start = g . nodes ( ) [ 0 ] ; var size = g . nodeCount ( ) ; t . setNode ( start , { } ) ; var edge , delta ; while ( tightTree ( t , g ) < size ) { edge = findMinSlackEdge ( t , g ) ; delta = t . hasNode ( edge . v ) ? slack ( g , edge ) : - slack ( g , edge ) ; shiftRanks ( t , g , delta ) } return t }
/ *
* Finds a maximal tree of tight edges and returns the number of nodes in the
* tree .
* / f u n c t i o n t i g h t T r e e ( t , g ) { f u n c t i o n d f s ( v ) { _ . f o r E a c h ( g . n o d e E d g e s ( v ) , f u n c t i o n ( e ) { v a r e d g e V = e . v , w = v = = = e d g e V ? e . w : e d g e V ; i f ( ! t . h a s N o d e ( w ) & & ! s l a c k ( g , e ) ) { t . s e t N o d e ( w , { } ) ; t . s e t E d g e ( v , w , { } ) ; d f s ( w ) } } ) } _ . f o r E a c h ( t . n o d e s ( ) , d f s ) ; r e t u r n t . n o d e C o u n t ( ) }
/ *
* Finds the edge with the smallest slack that is incident on tree and returns
* it .
* / f u n c t i o n f i n d M i n S l a c k E d g e ( t , g ) { r e t u r n _ . m i n B y ( g . e d g e s ( ) , f u n c t i o n ( e ) { i f ( t . h a s N o d e ( e . v ) ! = = t . h a s N o d e ( e . w ) ) { r e t u r n s l a c k ( g , e ) } } ) } f u n c t i o n s h i f t R a n k s ( t , g , d e l t a ) { _ . f o r E a c h ( t . n o d e s ( ) , f u n c t i o n ( v ) { g . n o d e ( v ) . r a n k + = d e l t a } ) } } , { " . . / g r a p h l i b " : 7 , " . . / l o d a s h " : 1 0 , " . / u t i l " : 2 8 } ] , 2 6 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { " u s e s t r i c t " ; v a r r a n k U t i l = r e q u i r e ( " . / u t i l " ) ; v a r l o n g e s t P a t h = r a n k U t i l . l o n g e s t P a t h ; v a r f e a s i b l e T r e e = r e q u i r e ( " . / f e a s i b l e - t r e e " ) ; v a r n e t w o r k S i m p l e x = r e q u i r e ( " . / n e t w o r k - s i m p l e x " ) ; m o d u l e . e x p o r t s = r a n k ;
/ *
* Assigns a rank to each node in the input graph that respects the "minlen"
* constraint specified on edges between nodes .
*
* This basic structure is derived from Gansner , et al . , " A Technique for
* Drawing Directed Graphs . "
*
* Pre - conditions :
*
* 1. Graph must be a connected DAG
* 2. Graph nodes must be objects
* 3. Graph edges must have "weight" and "minlen" attributes
*
* Post - conditions :
*
* 1. Graph nodes will have a "rank" attribute based on the results of the
* algorithm . Ranks can start at any index ( including negative ) , we ' ll
* fix them up later .
* / f u n c t i o n r a n k ( g ) { s w i t c h ( g . g r a p h ( ) . r a n k e r ) { c a s e " n e t w o r k - s i m p l e x " : n e t w o r k S i m p l e x R a n k e r ( g ) ; b r e a k ; c a s e " t i g h t - t r e e " : t i g h t T r e e R a n k e r ( g ) ; b r e a k ; c a s e " l o n g e s t - p a t h " : l o n g e s t P a t h R a n k e r ( g ) ; b r e a k ; d e f a u l t : n e t w o r k S i m p l e x R a n k e r ( g ) } }
// A fast and simple ranker, but results are far from optimal.
var longestPathRanker = longestPath ; function tightTreeRanker ( g ) { longestPath ( g ) ; feasibleTree ( g ) } function networkSimplexRanker ( g ) { networkSimplex ( g ) } } , { "./feasible-tree" : 25 , "./network-simplex" : 27 , "./util" : 28 } ] , 27 : [ function ( require , module , exports ) { "use strict" ; var _ = require ( "../lodash" ) ; var feasibleTree = require ( "./feasible-tree" ) ; var slack = require ( "./util" ) . slack ; var initRank = require ( "./util" ) . longestPath ; var preorder = require ( "../graphlib" ) . alg . preorder ; var postorder = require ( "../graphlib" ) . alg . postorder ; var simplify = require ( "../util" ) . simplify ; module . exports = networkSimplex ;
// Expose some internals for testing purposes
networkSimplex . initLowLimValues = initLowLimValues ; networkSimplex . initCutValues = initCutValues ; networkSimplex . calcCutValue = calcCutValue ; networkSimplex . leaveEdge = leaveEdge ; networkSimplex . enterEdge = enterEdge ; networkSimplex . exchangeEdges = exchangeEdges ;
/ *
* The network simplex algorithm assigns ranks to each node in the input graph
* and iteratively improves the ranking to reduce the length of edges .
*
* Preconditions :
*
* 1. The input graph must be a DAG .
* 2. All nodes in the graph must have an object value .
* 3. All edges in the graph must have "minlen" and "weight" attributes .
*
* Postconditions :
*
* 1. All nodes in the graph will have an assigned "rank" attribute that has
* been optimized by the network simplex algorithm . Ranks start at 0.
*
*
* A rough sketch of the algorithm is as follows :
*
* 1. Assign initial ranks to each node . We use the longest path algorithm ,
* which assigns ranks to the lowest position possible . In general this
* leads to very wide bottom ranks and unnecessarily long edges .
* 2. Construct a feasible tight tree . A tight tree is one such that all
* edges in the tree have no slack ( difference between length of edge
* and minlen for the edge ) . This by itself greatly improves the assigned
* rankings by shorting edges .
* 3. Iteratively find edges that have negative cut values . Generally a
* negative cut value indicates that the edge could be removed and a new
* tree edge could be added to produce a more compact graph .
*
* Much of the algorithms here are derived from Gansner , et al . , " A Technique
* for Drawing Directed Graphs . " The structure of the file roughly follows the
* structure of the overall algorithm .
* / f u n c t i o n n e t w o r k S i m p l e x ( g ) { g = s i m p l i f y ( g ) ; i n i t R a n k ( g ) ; v a r t = f e a s i b l e T r e e ( g ) ; i n i t L o w L i m V a l u e s ( t ) ; i n i t C u t V a l u e s ( t , g ) ; v a r e , f ; w h i l e ( e = l e a v e E d g e ( t ) ) { f = e n t e r E d g e ( t , g , e ) ; e x c h a n g e E d g e s ( t , g , e , f ) } }
/ *
* Initializes cut values for all edges in the tree .
* / f u n c t i o n i n i t C u t V a l u e s ( t , g ) { v a r v s = p o s t o r d e r ( t , t . n o d e s ( ) ) ; v s = v s . s l i c e ( 0 , v s . l e n g t h - 1 ) ; _ . f o r E a c h ( v s , f u n c t i o n ( v ) { a s s i g n C u t V a l u e ( t , g , v ) } ) } f u n c t i o n a s s i g n C u t V a l u e ( t , g , c h i l d ) { v a r c h i l d L a b = t . n o d e ( c h i l d ) ; v a r p a r e n t = c h i l d L a b . p a r e n t ; t . e d g e ( c h i l d , p a r e n t ) . c u t v a l u e = c a l c C u t V a l u e ( t , g , c h i l d ) }
/ *
* Given the tight tree , its graph , and a child in the graph calculate and
* return the cut value for the edge between the child and its parent .
* / f u n c t i o n c a l c C u t V a l u e ( t , g , c h i l d ) { v a r c h i l d L a b = t . n o d e ( c h i l d ) ; v a r p a r e n t = c h i l d L a b . p a r e n t ;
// True if the child is on the tail end of the edge in the directed graph
var childIsTail = true ;
// The graph's view of the tree edge we're inspecting
var graphEdge = g . edge ( child , parent ) ;
// The accumulated cut value for the edge between this node and its parent
var cutValue = 0 ; if ( ! graphEdge ) { childIsTail = false ; graphEdge = g . edge ( parent , child ) } cutValue = graphEdge . weight ; _ . forEach ( g . nodeEdges ( child ) , function ( e ) { var isOutEdge = e . v === child , other = isOutEdge ? e . w : e . v ; if ( other !== parent ) { var pointsToHead = isOutEdge === childIsTail , otherWeight = g . edge ( e ) . weight ; cutValue += pointsToHead ? otherWeight : - otherWeight ; if ( isTreeEdge ( t , child , other ) ) { var otherCutValue = t . edge ( child , other ) . cutvalue ; cutValue += pointsToHead ? - otherCutValue : otherCutValue } } } ) ; return cutValue } function initLowLimValues ( tree , root ) { if ( arguments . length < 2 ) { root = tree . nodes ( ) [ 0 ] } dfsAssignLowLim ( tree , { } , 1 , root ) } function dfsAssignLowLim ( tree , visited , nextLim , v , parent ) { var low = nextLim ; var label = tree . node ( v ) ; visited [ v ] = true ; _ . forEach ( tree . neighbors ( v ) , function ( w ) { if ( ! _ . has ( visited , w ) ) { nextLim = dfsAssignLowLim ( tree , visited , nextLim , w , v ) } } ) ; label . low = low ; label . lim = nextLim ++ ; if ( parent ) { label . parent = parent } else {
// TODO should be able to remove this when we incrementally update low lim
delete label . parent } return nextLim } function leaveEdge ( tree ) { return _ . find ( tree . edges ( ) , function ( e ) { return tree . edge ( e ) . cutvalue < 0 } ) } function enterEdge ( t , g , edge ) { var v = edge . v ; var w = edge . w ;
// For the rest of this function we assume that v is the tail and w is the
// head, so if we don't have this edge in the graph we should flip it to
// match the correct orientation.
if ( ! g . hasEdge ( v , w ) ) { v = edge . w ; w = edge . v } var vLabel = t . node ( v ) ; var wLabel = t . node ( w ) ; var tailLabel = vLabel ; var flip = false ;
// If the root is in the tail of the edge then we need to flip the logic that
// checks for the head and tail nodes in the candidates function below.
if ( vLabel . lim > wLabel . lim ) { tailLabel = wLabel ; flip = true } var candidates = _ . filter ( g . edges ( ) , function ( edge ) { return flip === isDescendant ( t , t . node ( edge . v ) , tailLabel ) && flip !== isDescendant ( t , t . node ( edge . w ) , tailLabel ) } ) ; return _ . minBy ( candidates , function ( edge ) { return slack ( g , edge ) } ) } function exchangeEdges ( t , g , e , f ) { var v = e . v ; var w = e . w ; t . removeEdge ( v , w ) ; t . setEdge ( f . v , f . w , { } ) ; initLowLimValues ( t ) ; initCutValues ( t , g ) ; updateRanks ( t , g ) } function updateRanks ( t , g ) { var root = _ . find ( t . nodes ( ) , function ( v ) { return ! g . node ( v ) . parent } ) ; var vs = preorder ( t , root ) ; vs = vs . slice ( 1 ) ; _ . forEach ( vs , function ( v ) { var parent = t . node ( v ) . parent , edge = g . edge ( v , parent ) , flipped = false ; if ( ! edge ) { edge = g . edge ( parent , v ) ; flipped = true } g . node ( v ) . rank = g . node ( parent ) . rank + ( flipped ? edge . minlen : - edge . minlen ) } ) }
/ *
* Returns true if the edge is in the tree .
* / f u n c t i o n i s T r e e E d g e ( t r e e , u , v ) { r e t u r n t r e e . h a s E d g e ( u , v ) }
/ *
* Returns true if the specified node is descendant of the root node per the
* assigned low and lim attributes in the tree .
* / f u n c t i o n i s D e s c e n d a n t ( t r e e , v L a b e l , r o o t L a b e l ) { r e t u r n r o o t L a b e l . l o w < = v L a b e l . l i m & & v L a b e l . l i m < = r o o t L a b e l . l i m } } , { " . . / g r a p h l i b " : 7 , " . . / l o d a s h " : 1 0 , " . . / u t i l " : 2 9 , " . / f e a s i b l e - t r e e " : 2 5 , " . / u t i l " : 2 8 } ] , 2 8 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { " u s e s t r i c t " ; v a r _ = r e q u i r e ( " . . / l o d a s h " ) ; m o d u l e . e x p o r t s = { l o n g e s t P a t h : l o n g e s t P a t h , s l a c k : s l a c k } ;
/ *
* Initializes ranks for the input graph using the longest path algorithm . This
* algorithm scales well and is fast in practice , it yields rather poor
* solutions . Nodes are pushed to the lowest layer possible , leaving the bottom
* ranks wide and leaving edges longer than necessary . However , due to its
* speed , this algorithm is good for getting an initial ranking that can be fed
* into other algorithms .
*
* This algorithm does not normalize layers because it will be used by other
* algorithms in most cases . If using this algorithm directly , be sure to
* run normalize at the end .
*
* Pre - conditions :
*
* 1. Input graph is a DAG .
* 2. Input graph node labels can be assigned properties .
*
* Post - conditions :
*
* 1. Each node will be assign an ( unnormalized ) "rank" property .
* /function longestPath(g){var visited={};function dfs(v){var label=g.node(v);if(_.has(visited,v)){return label.rank}visited[v]=true;var rank=_.min(_.map(g.outEdges(v),function(e){return dfs(e.w)-g.edge(e).minlen}));if(rank===Number.POSITIVE_INFINITY||/ / return value of _ . map ( [ ] ) for Lodash 3
rank === undefined || // return value of _.map([]) for Lodash 4
rank === null ) { // return value of _.map([null])
rank = 0 } return label . rank = rank } _ . forEach ( g . sources ( ) , dfs ) }
/ *
* Returns the amount of slack for the given edge . The slack is defined as the
* difference between the length of the edge and its minimum length .
* / f u n c t i o n s l a c k ( g , e ) { r e t u r n g . n o d e ( e . w ) . r a n k - g . n o d e ( e . v ) . r a n k - g . e d g e ( e ) . m i n l e n } } , { " . . / l o d a s h " : 1 0 } ] , 2 9 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) {
/* eslint "no-console": off */
"use strict" ; var _ = require ( "./lodash" ) ; var Graph = require ( "./graphlib" ) . Graph ; module . exports = { addDummyNode : addDummyNode , simplify : simplify , asNonCompoundGraph : asNonCompoundGraph , successorWeights : successorWeights , predecessorWeights : predecessorWeights , intersectRect : intersectRect , buildLayerMatrix : buildLayerMatrix , normalizeRanks : normalizeRanks , removeEmptyRanks : removeEmptyRanks , addBorderNode : addBorderNode , maxRank : maxRank , partition : partition , time : time , notime : notime } ;
/ *
* Adds a dummy node to the graph and return v .
* / f u n c t i o n a d d D u m m y N o d e ( g , t y p e , a t t r s , n a m e ) { v a r v ; d o { v = _ . u n i q u e I d ( n a m e ) } w h i l e ( g . h a s N o d e ( v ) ) ; a t t r s . d u m m y = t y p e ; g . s e t N o d e ( v , a t t r s ) ; r e t u r n v }
/ *
* Returns a new graph with only simple edges . Handles aggregation of data
* associated with multi - edges .
* / f u n c t i o n s i m p l i f y ( g ) { v a r s i m p l i f i e d = ( n e w G r a p h ) . s e t G r a p h ( g . g r a p h ( ) ) ; _ . f o r E a c h ( g . n o d e s ( ) , f u n c t i o n ( v ) { s i m p l i f i e d . s e t N o d e ( v , g . n o d e ( v ) ) } ) ; _ . f o r E a c h ( g . e d g e s ( ) , f u n c t i o n ( e ) { v a r s i m p l e L a b e l = s i m p l i f i e d . e d g e ( e . v , e . w ) | | { w e i g h t : 0 , m i n l e n : 1 } ; v a r l a b e l = g . e d g e ( e ) ; s i m p l i f i e d . s e t E d g e ( e . v , e . w , { w e i g h t : s i m p l e L a b e l . w e i g h t + l a b e l . w e i g h t , m i n l e n : M a t h . m a x ( s i m p l e L a b e l . m i n l e n , l a b e l . m i n l e n ) } ) } ) ; r e t u r n s i m p l i f i e d } f u n c t i o n a s N o n C o m p o u n d G r a p h ( g ) { v a r s i m p l i f i e d = n e w G r a p h ( { m u l t i g r a p h : g . i s M u l t i g r a p h ( ) } ) . s e t G r a p h ( g . g r a p h ( ) ) ; _ . f o r E a c h ( g . n o d e s ( ) , f u n c t i o n ( v ) { i f ( ! g . c h i l d r e n ( v ) . l e n g t h ) { s i m p l i f i e d . s e t N o d e ( v , g . n o d e ( v ) ) } } ) ; _ . f o r E a c h ( g . e d g e s ( ) , f u n c t i o n ( e ) { s i m p l i f i e d . s e t E d g e ( e , g . e d g e ( e ) ) } ) ; r e t u r n s i m p l i f i e d } f u n c t i o n s u c c e s s o r W e i g h t s ( g ) { v a r w e i g h t M a p = _ . m a p ( g . n o d e s ( ) , f u n c t i o n ( v ) { v a r s u c s = { } ; _ . f o r E a c h ( g . o u t E d g e s ( v ) , f u n c t i o n ( e ) { s u c s [ e . w ] = ( s u c s [ e . w ] | | 0 ) + g . e d g e ( e ) . w e i g h t } ) ; r e t u r n s u c s } ) ; r e t u r n _ . z i p O b j e c t ( g . n o d e s ( ) , w e i g h t M a p ) } f u n c t i o n p r e d e c e s s o r W e i g h t s ( g ) { v a r w e i g h t M a p = _ . m a p ( g . n o d e s ( ) , f u n c t i o n ( v ) { v a r p r e d s = { } ; _ . f o r E a c h ( g . i n E d g e s ( v ) , f u n c t i o n ( e ) { p r e d s [ e . v ] = ( p r e d s [ e . v ] | | 0 ) + g . e d g e ( e ) . w e i g h t } ) ; r e t u r n p r e d s } ) ; r e t u r n _ . z i p O b j e c t ( g . n o d e s ( ) , w e i g h t M a p ) }
/ *
* Finds where a line starting at point ( { x , y } ) would intersect a rectangle
* ( { x , y , width , height } ) if it were pointing at the rectangle ' s center .
* / f u n c t i o n i n t e r s e c t R e c t ( r e c t , p o i n t ) { v a r x = r e c t . x ; v a r y = r e c t . y ;
// Rectangle intersection algorithm from:
2022-12-26 16:47:39 +00:00
// https://math.stackexchange.com/questions/108113/find-edge-between-two-boxes
2022-12-03 18:54:54 +00:00
var dx = point . x - x ; var dy = point . y - y ; var w = rect . width / 2 ; var h = rect . height / 2 ; if ( ! dx && ! dy ) { throw new Error ( "Not possible to find intersection inside of the rectangle" ) } var sx , sy ; if ( Math . abs ( dy ) * w > Math . abs ( dx ) * h ) {
// Intersection is top or bottom of rect.
if ( dy < 0 ) { h = - h } sx = h * dx / dy ; sy = h } else {
// Intersection is left or right of rect.
if ( dx < 0 ) { w = - w } sx = w ; sy = w * dy / dx } return { x : x + sx , y : y + sy } }
/ *
* Given a DAG with each node assigned "rank" and "order" properties , this
* function will produce a matrix with the ids of each node .
* / f u n c t i o n b u i l d L a y e r M a t r i x ( g ) { v a r l a y e r i n g = _ . m a p ( _ . r a n g e ( m a x R a n k ( g ) + 1 ) , f u n c t i o n ( ) { r e t u r n [ ] } ) ; _ . f o r E a c h ( g . n o d e s ( ) , f u n c t i o n ( v ) { v a r n o d e = g . n o d e ( v ) ; v a r r a n k = n o d e . r a n k ; i f ( ! _ . i s U n d e f i n e d ( r a n k ) ) { l a y e r i n g [ r a n k ] [ n o d e . o r d e r ] = v } } ) ; r e t u r n l a y e r i n g }
/ *
* Adjusts the ranks for all nodes in the graph such that all nodes v have
* rank ( v ) >= 0 and at least one node w has rank ( w ) = 0.
* / f u n c t i o n n o r m a l i z e R a n k s ( g ) { v a r m i n = _ . m i n ( _ . m a p ( g . n o d e s ( ) , f u n c t i o n ( v ) { r e t u r n g . n o d e ( v ) . r a n k } ) ) ; _ . f o r E a c h ( g . n o d e s ( ) , f u n c t i o n ( v ) { v a r n o d e = g . n o d e ( v ) ; i f ( _ . h a s ( n o d e , " r a n k " ) ) { n o d e . r a n k - = m i n } } ) } f u n c t i o n r e m o v e E m p t y R a n k s ( g ) {
// Ranks may not start at 0, so we need to offset them
var offset = _ . min ( _ . map ( g . nodes ( ) , function ( v ) { return g . node ( v ) . rank } ) ) ; var layers = [ ] ; _ . forEach ( g . nodes ( ) , function ( v ) { var rank = g . node ( v ) . rank - offset ; if ( ! layers [ rank ] ) { layers [ rank ] = [ ] } layers [ rank ] . push ( v ) } ) ; var delta = 0 ; var nodeRankFactor = g . graph ( ) . nodeRankFactor ; _ . forEach ( layers , function ( vs , i ) { if ( _ . isUndefined ( vs ) && i % nodeRankFactor !== 0 ) { -- delta } else if ( delta ) { _ . forEach ( vs , function ( v ) { g . node ( v ) . rank += delta } ) } } ) } function addBorderNode ( g , prefix , rank , order ) { var node = { width : 0 , height : 0 } ; if ( arguments . length >= 4 ) { node . rank = rank ; node . order = order } return addDummyNode ( g , "border" , node , prefix ) } function maxRank ( g ) { return _ . max ( _ . map ( g . nodes ( ) , function ( v ) { var rank = g . node ( v ) . rank ; if ( ! _ . isUndefined ( rank ) ) { return rank } } ) ) }
/ *
* Partition a collection into two groups : ` lhs ` and ` rhs ` . If the supplied
* function returns true for an entry it goes into ` lhs ` . Otherwise it goes
* into ` rhs.
* / f u n c t i o n p a r t i t i o n ( c o l l e c t i o n , f n ) { v a r r e s u l t = { l h s : [ ] , r h s : [ ] } ; _ . f o r E a c h ( c o l l e c t i o n , f u n c t i o n ( v a l u e ) { i f ( f n ( v a l u e ) ) { r e s u l t . l h s . p u s h ( v a l u e ) } e l s e { r e s u l t . r h s . p u s h ( v a l u e ) } } ) ; r e t u r n r e s u l t }
/ *
* Returns a new function that wraps ` fn ` with a timer . The wrapper logs the
* time it takes to execute the function .
* / f u n c t i o n t i m e ( n a m e , f n ) { v a r s t a r t = _ . n o w ( ) ; t r y { r e t u r n f n ( ) } f i n a l l y { c o n s o l e . l o g ( n a m e + " t i m e : " + ( _ . n o w ( ) - s t a r t ) + " m s " ) } } f u n c t i o n n o t i m e ( n a m e , f n ) { r e t u r n f n ( ) } } , { " . / g r a p h l i b " : 7 , " . / l o d a s h " : 1 0 } ] , 3 0 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { m o d u l e . e x p o r t s = " 0 . 8 . 5 " } , { } ] , 3 1 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) {
/ * *
* Copyright ( c ) 2014 , Chris Pettitt
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are met :
*
* 1. Redistributions of source code must retain the above copyright notice , this
* list of conditions and the following disclaimer .
*
* 2. Redistributions in binary form must reproduce the above copyright notice ,
* this list of conditions and the following disclaimer in the documentation
* and / or other materials provided with the distribution .
*
* 3. Neither the name of the copyright holder nor the names of its contributors
* may be used to endorse or promote products derived from this software without
* specific prior written permission .
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT LIMITED TO , THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
* DAMAGES ( INCLUDING , BUT NOT LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES ; LOSS OF USE , DATA , OR PROFITS ; OR BUSINESS INTERRUPTION ) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY ,
* OR TORT ( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE , EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE .
* /
var lib = require ( "./lib" ) ; module . exports = { Graph : lib . Graph , json : require ( "./lib/json" ) , alg : require ( "./lib/alg" ) , version : lib . version } } , { "./lib" : 47 , "./lib/alg" : 38 , "./lib/json" : 48 } ] , 32 : [ function ( require , module , exports ) { var _ = require ( "../lodash" ) ; module . exports = components ; function components ( g ) { var visited = { } ; var cmpts = [ ] ; var cmpt ; function dfs ( v ) { if ( _ . has ( visited , v ) ) return ; visited [ v ] = true ; cmpt . push ( v ) ; _ . each ( g . successors ( v ) , dfs ) ; _ . each ( g . predecessors ( v ) , dfs ) } _ . each ( g . nodes ( ) , function ( v ) { cmpt = [ ] ; dfs ( v ) ; if ( cmpt . length ) { cmpts . push ( cmpt ) } } ) ; return cmpts } } , { "../lodash" : 49 } ] , 33 : [ function ( require , module , exports ) { var _ = require ( "../lodash" ) ; module . exports = dfs ;
/ *
2022-12-26 16:47:39 +00:00
* A helper that performs a pre - or post - order traversal on the input graph
2022-12-03 18:54:54 +00:00
* and returns the nodes in the order they were visited . If the graph is
* undirected then this algorithm will navigate using neighbors . If the graph
* is directed then this algorithm will navigate using successors .
*
* Order must be one of "pre" or "post" .
* / f u n c t i o n d f s ( g , v s , o r d e r ) { i f ( ! _ . i s A r r a y ( v s ) ) { v s = [ v s ] } v a r n a v i g a t i o n = ( g . i s D i r e c t e d ( ) ? g . s u c c e s s o r s : g . n e i g h b o r s ) . b i n d ( g ) ; v a r a c c = [ ] ; v a r v i s i t e d = { } ; _ . e a c h ( v s , f u n c t i o n ( v ) { i f ( ! g . h a s N o d e ( v ) ) { t h r o w n e w E r r o r ( " G r a p h d o e s n o t h a v e n o d e : " + v ) } d o D f s ( g , v , o r d e r = = = " p o s t " , v i s i t e d , n a v i g a t i o n , a c c ) } ) ; r e t u r n a c c } f u n c t i o n d o D f s ( g , v , p o s t o r d e r , v i s i t e d , n a v i g a t i o n , a c c ) { i f ( ! _ . h a s ( v i s i t e d , v ) ) { v i s i t e d [ v ] = t r u e ; i f ( ! p o s t o r d e r ) { a c c . p u s h ( v ) } _ . e a c h ( n a v i g a t i o n ( v ) , f u n c t i o n ( w ) { d o D f s ( g , w , p o s t o r d e r , v i s i t e d , n a v i g a t i o n , a c c ) } ) ; i f ( p o s t o r d e r ) { a c c . p u s h ( v ) } } } } , { " . . / l o d a s h " : 4 9 } ] , 3 4 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r d i j k s t r a = r e q u i r e ( " . / d i j k s t r a " ) ; v a r _ = r e q u i r e ( " . . / l o d a s h " ) ; m o d u l e . e x p o r t s = d i j k s t r a A l l ; f u n c t i o n d i j k s t r a A l l ( g , w e i g h t F u n c , e d g e F u n c ) { r e t u r n _ . t r a n s f o r m ( g . n o d e s ( ) , f u n c t i o n ( a c c , v ) { a c c [ v ] = d i j k s t r a ( g , v , w e i g h t F u n c , e d g e F u n c ) } , { } ) } } , { " . . / l o d a s h " : 4 9 , " . / d i j k s t r a " : 3 5 } ] , 3 5 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r _ = r e q u i r e ( " . . / l o d a s h " ) ; v a r P r i o r i t y Q u e u e = r e q u i r e ( " . . / d a t a / p r i o r i t y - q u e u e " ) ; m o d u l e . e x p o r t s = d i j k s t r a ; v a r D E F A U L T _ W E I G H T _ F U N C = _ . c o n s t a n t ( 1 ) ; f u n c t i o n d i j k s t r a ( g , s o u r c e , w e i g h t F n , e d g e F n ) { r e t u r n r u n D i j k s t r a ( g , S t r i n g ( s o u r c e ) , w e i g h t F n | | D E F A U L T _ W E I G H T _ F U N C , e d g e F n | | f u n c t i o n ( v ) { r e t u r n g . o u t E d g e s ( v ) } ) } f u n c t i o n r u n D i j k s t r a ( g , s o u r c e , w e i g h t F n , e d g e F n ) { v a r r e s u l t s = { } ; v a r p q = n e w P r i o r i t y Q u e u e ; v a r v , v E n t r y ; v a r u p d a t e N e i g h b o r s = f u n c t i o n ( e d g e ) { v a r w = e d g e . v ! = = v ? e d g e . v : e d g e . w ; v a r w E n t r y = r e s u l t s [ w ] ; v a r w e i g h t = w e i g h t F n ( e d g e ) ; v a r d i s t a n c e = v E n t r y . d i s t a n c e + w e i g h t ; i f ( w e i g h t < 0 ) { t h r o w n e w E r r o r ( " d i j k s t r a d o e s n o t a l l o w n e g a t i v e e d g e w e i g h t s . " + " B a d e d g e : " + e d g e + " W e i g h t : " + w e i g h t ) } i f ( d i s t a n c e < w E n t r y . d i s t a n c e ) { w E n t r y . d i s t a n c e = d i s t a n c e ; w E n t r y . p r e d e c e s s o r = v ; p q . d e c r e a s e ( w , d i s t a n c e ) } } ; g . n o d e s ( ) . f o r E a c h ( f u n c t i o n ( v ) { v a r d i s t a n c e = v = = = s o u r c e ? 0 : N u m b e r . P O S I T I V E _ I N F I N I T Y ; r e s u l t s [ v ] = { d i s t a n c e : d i s t a n c e } ; p q . a d d ( v , d i s t a n c e ) } ) ; w h i l e ( p q . s i z e ( ) > 0 ) { v = p q . r e m o v e M i n ( ) ; v E n t r y = r e s u l t s [ v ] ; i f ( v E n t r y . d i s t a n c e = = = N u m b e r . P O S I T I V E _ I N F I N I T Y ) { b r e a k } e d g e F n ( v ) . f o r E a c h ( u p d a t e N e i g h b o r s ) } r e t u r n r e s u l t s } } , { " . . / d a t a / p r i o r i t y - q u e u e " : 4 5 , " . . / l o d a s h " : 4 9 } ] , 3 6 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r _ = r e q u i r e ( " . . / l o d a s h " ) ; v a r t a r j a n = r e q u i r e ( " . / t a r j a n " ) ; m o d u l e . e x p o r t s = f i n d C y c l e s ; f u n c t i o n f i n d C y c l e s ( g ) { r e t u r n _ . f i l t e r ( t a r j a n ( g ) , f u n c t i o n ( c m p t ) { r e t u r n c m p t . l e n g t h > 1 | | c m p t . l e n g t h = = = 1 & & g . h a s E d g e ( c m p t [ 0 ] , c m p t [ 0 ] ) } ) } } , { " . . / l o d a s h " : 4 9 , " . / t a r j a n " : 4 3 } ] , 3 7 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r _ = r e q u i r e ( " . . / l o d a s h " ) ; m o d u l e . e x p o r t s = f l o y d W a r s h a l l ; v a r D E F A U L T _ W E I G H T _ F U N C = _ . c o n s t a n t ( 1 ) ; f u n c t i o n f l o y d W a r s h a l l ( g , w e i g h t F n , e d g e F n ) { r e t u r n r u n F l o y d W a r s h a l l ( g , w e i g h t F n | | D E F A U L T _ W E I G H T _ F U N C , e d g e F n | | f u n c t i o n ( v ) { r e t u r n g . o u t E d g e s ( v ) } ) } f u n c t i o n r u n F l o y d W a r s h a l l ( g , w e i g h t F n , e d g e F n ) { v a r r e s u l t s = { } ; v a r n o d e s = g . n o d e s ( ) ; n o d e s . f o r E a c h ( f u n c t i o n ( v ) { r e s u l t s [ v ] = { } ; r e s u l t s [ v ] [ v ] = { d i s t a n c e : 0 } ; n o d e s . f o r E a c h ( f u n c t i o n ( w ) { i f ( v ! = = w ) { r e s u l t s [ v ] [ w ] = { d i s t a n c e : N u m b e r . P O S I T I V E _ I N F I N I T Y } } } ) ; e d g e F n ( v ) . f o r E a c h ( f u n c t i o n ( e d g e ) { v a r w = e d g e . v = = = v ? e d g e . w : e d g e . v ; v a r d = w e i g h t F n ( e d g e ) ; r e s u l t s [ v ] [ w ] = { d i s t a n c e : d , p r e d e c e s s o r : v } } ) } ) ; n o d e s . f o r E a c h ( f u n c t i o n ( k ) { v a r r o w K = r e s u l t s [ k ] ; n o d e s . f o r E a c h ( f u n c t i o n ( i ) { v a r r o w I = r e s u l t s [ i ] ; n o d e s . f o r E a c h ( f u n c t i o n ( j ) { v a r i k = r o w I [ k ] ; v a r k j = r o w K [ j ] ; v a r i j = r o w I [ j ] ; v a r a l t D i s t a n c e = i k . d i s t a n c e + k j . d i s t a n c e ; i f ( a l t D i s t a n c e < i j . d i s t a n c e ) { i j . d i s t a n c e = a l t D i s t a n c e ; i j . p r e d e c e s s o r = k j . p r e d e c e s s o r } } ) } ) } ) ; r e t u r n r e s u l t s } } , { " . . / l o d a s h " : 4 9 } ] , 3 8 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { m o d u l e . e x p o r t s = { c o m p o n e n t s : r e q u i r e ( " . / c o m p o n e n t s " ) , d i j k s t r a : r e q u i r e ( " . / d i j k s t r a " ) , d i j k s t r a A l l : r e q u i r e ( " . / d i j k s t r a - a l l " ) , f i n d C y c l e s : r e q u i r e ( " . / f i n d - c y c l e s " ) , f l o y d W a r s h a l l : r e q u i r e ( " . / f l o y d - w a r s h a l l " ) , i s A c y c l i c : r e q u i r e ( " . / i s - a c y c l i c " ) , p o s t o r d e r : r e q u i r e ( " . / p o s t o r d e r " ) , p r e o r d e r : r e q u i r e ( " . / p r e o r d e r " ) , p r i m : r e q u i r e ( " . / p r i m " ) , t a r j a n : r e q u i r e ( " . / t a r j a n " ) , t o p s o r t : r e q u i r e ( " . / t o p s o r t " ) } } , { " . / c o m p o n e n t s " : 3 2 , " . / d i j k s t r a " : 3 5 , " . / d i j k s t r a - a l l " : 3 4 , " . / f i n d - c y c l e s " : 3 6 , " . / f l o y d - w a r s h a l l " : 3 7 , " . / i s - a c y c l i c " : 3 9 , " . / p o s t o r d e r " : 4 0 , " . / p r e o r d e r " : 4 1 , " . / p r i m " : 4 2 , " . / t a r j a n " : 4 3 , " . / t o p s o r t " : 4 4 } ] , 3 9 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r t o p s o r t = r e q u i r e ( " . / t o p s o r t " ) ; m o d u l e . e x p o r t s = i s A c y c l i c ; f u n c t i o n i s A c y c l i c ( g ) { t r y { t o p s o r t ( g ) } c a t c h ( e ) { i f ( e i n s t a n c e o f t o p s o r t . C y c l e E x c e p t i o n ) { r e t u r n f a l s e } t h r o w e } r e t u r n t r u e } } , { " . / t o p s o r t " : 4 4 } ] , 4 0 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x
// Start from an arbitrary node
pq . decrease ( g . nodes ( ) [ 0 ] , 0 ) ; var init = false ; while ( pq . size ( ) > 0 ) { v = pq . removeMin ( ) ; if ( _ . has ( parents , v ) ) { result . setEdge ( v , parents [ v ] ) } else if ( init ) { throw new Error ( "Input graph is not connected: " + g ) } else { init = true } g . nodeEdges ( v ) . forEach ( updateNeighbors ) } return result } } , { "../data/priority-queue" : 45 , "../graph" : 46 , "../lodash" : 49 } ] , 43 : [ function ( require , module , exports ) { var _ = require ( "../lodash" ) ; module . exports = tarjan ; function tarjan ( g ) { var index = 0 ; var stack = [ ] ; var visited = { } ; // node id -> { onStack, lowlink, index }
var results = [ ] ; function dfs ( v ) { var entry = visited [ v ] = { onStack : true , lowlink : index , index : index ++ } ; stack . push ( v ) ; g . successors ( v ) . forEach ( function ( w ) { if ( ! _ . has ( visited , w ) ) { dfs ( w ) ; entry . lowlink = Math . min ( entry . lowlink , visited [ w ] . lowlink ) } else if ( visited [ w ] . onStack ) { entry . lowlink = Math . min ( entry . lowlink , visited [ w ] . index ) } } ) ; if ( entry . lowlink === entry . index ) { var cmpt = [ ] ; var w ; do { w = stack . pop ( ) ; visited [ w ] . onStack = false ; cmpt . push ( w ) } while ( v !== w ) ; results . push ( cmpt ) } } g . nodes ( ) . forEach ( function ( v ) { if ( ! _ . has ( visited , v ) ) { dfs ( v ) } } ) ; return results } } , { "../lodash" : 49 } ] , 44 : [ function ( require , module , exports ) { var _ = require ( "../lodash" ) ; module . exports = topsort ; topsort . CycleException = CycleException ; function topsort ( g ) { var visited = { } ; var stack = { } ; var results = [ ] ; function visit ( node ) { if ( _ . has ( stack , node ) ) { throw new CycleException } if ( ! _ . has ( visited , node ) ) { stack [ node ] = true ; visited [ node ] = true ; _ . each ( g . predecessors ( node ) , visit ) ; delete stack [ node ] ; results . push ( node ) } } _ . each ( g . sinks ( ) , visit ) ; if ( _ . size ( visited ) !== g . nodeCount ( ) ) { throw new CycleException } return results } function CycleException ( ) { } CycleException . prototype = new Error ; // must be an instance of Error to pass testing
} , { "../lodash" : 49 } ] , 45 : [ function ( require , module , exports ) { var _ = require ( "../lodash" ) ; module . exports = PriorityQueue ;
/ * *
* A min - priority queue data structure . This algorithm is derived from Cormen ,
* et al . , "Introduction to Algorithms" . The basic idea of a min - priority
* queue is that you can efficiently ( in O ( 1 ) time ) get the smallest key in
* the queue . Adding and removing elements takes O ( log n ) time . A key can
* have its priority decreased in O ( log n ) time .
* / f u n c t i o n P r i o r i t y Q u e u e ( ) { t h i s . _ a r r = [ ] ; t h i s . _ k e y I n d i c e s = { } }
/ * *
* Returns the number of elements in the queue . Takes ` O(1) ` time .
* / P r i o r i t y Q u e u e . p r o t o t y p e . s i z e = f u n c t i o n ( ) { r e t u r n t h i s . _ a r r . l e n g t h } ;
/ * *
* Returns the keys that are in the queue . Takes ` O(n) ` time .
* / P r i o r i t y Q u e u e . p r o t o t y p e . k e y s = f u n c t i o n ( ) { r e t u r n t h i s . _ a r r . m a p ( f u n c t i o n ( x ) { r e t u r n x . k e y } ) } ;
/ * *
* Returns ` true ` if * * key * * is in the queue and ` false ` if not .
* / P r i o r i t y Q u e u e . p r o t o t y p e . h a s = f u n c t i o n ( k e y ) { r e t u r n _ . h a s ( t h i s . _ k e y I n d i c e s , k e y ) } ;
/ * *
* Returns the priority for * * key * * . If * * key * * is not present in the queue
* then this function returns ` undefined ` . Takes ` O(1) ` time .
*
* @ param { Object } key
* / P r i o r i t y Q u e u e . p r o t o t y p e . p r i o r i t y = f u n c t i o n ( k e y ) { v a r i n d e x = t h i s . _ k e y I n d i c e s [ k e y ] ; i f ( i n d e x ! = = u n d e f i n e d ) { r e t u r n t h i s . _ a r r [ i n d e x ] . p r i o r i t y } } ;
/ * *
* Returns the key for the minimum element in this queue . If the queue is
* empty this function throws an Error . Takes ` O(1) ` time .
* / P r i o r i t y Q u e u e . p r o t o t y p e . m i n = f u n c t i o n ( ) { i f ( t h i s . s i z e ( ) = = = 0 ) { t h r o w n e w E r r o r ( " Q u e u e u n d e r f l o w " ) } r e t u r n t h i s . _ a r r [ 0 ] . k e y } ;
/ * *
* Inserts a new key into the priority queue . If the key already exists in
* the queue this function returns ` false ` ; otherwise it will return ` true ` .
* Takes ` O(n) ` time .
*
* @ param { Object } key the key to add
* @ param { Number } priority the initial priority for the key
* / P r i o r i t y Q u e u e . p r o t o t y p e . a d d = f u n c t i o n ( k e y , p r i o r i t y ) { v a r k e y I n d i c e s = t h i s . _ k e y I n d i c e s ; k e y = S t r i n g ( k e y ) ; i f ( ! _ . h a s ( k e y I n d i c e s , k e y ) ) { v a r a r r = t h i s . _ a r r ; v a r i n d e x = a r r . l e n g t h ; k e y I n d i c e s [ k e y ] = i n d e x ; a r r . p u s h ( { k e y : k e y , p r i o r i t y : p r i o r i t y } ) ; t h i s . _ d e c r e a s e ( i n d e x ) ; r e t u r n t r u e } r e t u r n f a l s e } ;
/ * *
* Removes and returns the smallest key in the queue . Takes ` O(log n) ` time .
* / P r i o r i t y Q u e u e . p r o t o t y p e . r e m o v e M i n = f u n c t i o n ( ) { t h i s . _ s w a p ( 0 , t h i s . _ a r r . l e n g t h - 1 ) ; v a r m i n = t h i s . _ a r r . p o p ( ) ; d e l e t e t h i s . _ k e y I n d i c e s [ m i n . k e y ] ; t h i s . _ h e a p i f y ( 0 ) ; r e t u r n m i n . k e y } ;
/ * *
* Decreases the priority for * * key * * to * * priority * * . If the new priority is
* greater than the previous priority , this function will throw an Error .
*
* @ param { Object } key the key for which to raise priority
* @ param { Number } priority the new priority for the key
* / P r i o r i t y Q u e u e . p r o t o t y p e . d e c r e a s e = f u n c t i o n ( k e y , p r i o r i t y ) { v a r i n d e x = t h i s . _ k e y I n d i c e s [ k e y ] ; i f ( p r i o r i t y > t h i s . _ a r r [ i n d e x ] . p r i o r i t y ) { t h r o w n e w E r r o r ( " N e w p r i o r i t y i s g r e a t e r t h a n c u r r e n t p r i o r i t y . " + " K e y : " + k e y + " O l d : " + t h i s . _ a r r [ i n d e x ] . p r i o r i t y + " N e w : " + p r i o r i t y ) } t h i s . _ a r r [ i n d e x ] . p r i o r i t y = p r i o r i t y ; t h i s . _ d e c r e a s e ( i n d e x ) } ; P r i o r i t y Q u e u e . p r o t o t y p e . _ h e a p i f y = f u n c t i o n ( i ) { v a r a r r = t h i s . _ a r r ; v a r l = 2 * i ; v a r r = l + 1 ; v a r l a r g e s t = i ; i f ( l < a r r . l e n g t h ) { l a r g e s t = a r r [ l ] . p r i o r i t y < a r r [ l a r g e s t ] . p r i o r i t y ? l : l a r g e s t ; i f ( r < a r r . l e n g t h ) { l a r g e s t = a r r [ r ] . p r i o r i t y < a r r [ l a r g e s t ] . p r i o r i t y ? r : l a r g e s t } i f ( l a r g e s t ! = = i ) { t h i s . _ s w a p ( i , l a r g e s t ) ; t h i s . _ h e a p i f y ( l a r g e s t ) } } } ; P r i o r i t y Q u e u e . p r o t o t y p e . _ d e c r e a s e = f u n c t i o n ( i n d e x ) { v a r a r r = t h i s . _ a r r ; v a r p r i o r i t y = a r r [ i n d e x ] . p r i o r i t y ; v a r p a r e n t ; w h i l e ( i n d e x ! = = 0 ) { p a r e n t = i n d e x > > 1 ; i f ( a r r [ p a r e n t ] . p r i o r i t y < p r i o r i t y ) { b r e a k } t h i s . _ s w a p ( i n d e x , p a r e n t ) ; i n d e x = p a r e n t } } ; P r i o r i t y Q u e u e . p r o t o t y p e . _ s w a p = f u n c t i o n ( i , j ) { v a r a r r = t h i s . _ a r r ; v a r k e y I n d i c e s = t h i s . _ k e y I n d i c e s ; v a r o r i g A r r I = a r r [ i ] ; v a r o r i g A r r J = a r r [ j ] ; a r r [ i ] = o r i g A r r J ; a r r [ j ] = o r i g A r r I ; k e y I n d i c e s [ o r i g A r r J . k e y ] = i ; k e y I n d i c e s [ o r i g A r r I . k e y ] = j } } , { " . . / l o d a s h " : 4 9 } ] , 4 6 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { " u s e s t r i c t " ; v a r _ = r e q u i r e ( " . / l o d a s h " ) ; m o d u l e . e x p o r t s = G r a p h ; v a r D E F A U L T _ E D G E _ N A M E = " \ 0 " ; v a r G R A P H _ N O D E = " \ 0 " ; v a r E D G E _ K E Y _ D E L I M = " " ;
// Implementation notes:
//
// * Node id query functions should return string ids for the nodes
// * Edge id query functions should return an "edgeObj", edge object, that is
// composed of enough information to uniquely identify an edge: {v, w, name}.
// * Internally we use an "edgeId", a stringified form of the edgeObj, to
// reference edges. This is because we need a performant way to look these
// edges up and, object properties, which have string keys, are the closest
// we're going to get to a performant hashtable in JavaScript.
function Graph ( opts ) { this . _isDirected = _ . has ( opts , "directed" ) ? opts . directed : true ; this . _isMultigraph = _ . has ( opts , "multigraph" ) ? opts . multigraph : false ; this . _isCompound = _ . has ( opts , "compound" ) ? opts . compound : false ;
// Label for the graph itself
this . _label = undefined ;
// Defaults to be set when creating a new node
this . _defaultNodeLabelFn = _ . constant ( undefined ) ;
// Defaults to be set when creating a new edge
this . _defaultEdgeLabelFn = _ . constant ( undefined ) ;
// v -> label
this . _nodes = { } ; if ( this . _isCompound ) {
// v -> parent
this . _parent = { } ;
// v -> children
this . _children = { } ; this . _children [ GRAPH _NODE ] = { } }
// v -> edgeObj
this . _in = { } ;
// u -> v -> Number
this . _preds = { } ;
// v -> edgeObj
this . _out = { } ;
// v -> w -> Number
this . _sucs = { } ;
// e -> edgeObj
this . _edgeObjs = { } ;
// e -> label
this . _edgeLabels = { } }
/* Number of nodes in the graph. Should only be changed by the implementation. */ Graph . prototype . _nodeCount = 0 ;
/* Number of edges in the graph. Should only be changed by the implementation. */ Graph . prototype . _edgeCount = 0 ;
/* === Graph functions ========= */ Graph . prototype . isDirected = function ( ) { return this . _isDirected } ; Graph . prototype . isMultigraph = function ( ) { return this . _isMultigraph } ; Graph . prototype . isCompound = function ( ) { return this . _isCompound } ; Graph . prototype . setGraph = function ( label ) { this . _label = label ; return this } ; Graph . prototype . graph = function ( ) { return this . _label } ;
/* === Node functions ========== */ Graph . prototype . setDefaultNodeLabel = function ( newDefault ) { if ( ! _ . isFunction ( newDefault ) ) { newDefault = _ . constant ( newDefault ) } this . _defaultNodeLabelFn = newDefault ; return this } ; Graph . prototype . nodeCount = function ( ) { return this . _nodeCount } ; Graph . prototype . nodes = function ( ) { return _ . keys ( this . _nodes ) } ; Graph . prototype . sources = function ( ) { var self = this ; return _ . filter ( this . nodes ( ) , function ( v ) { return _ . isEmpty ( self . _in [ v ] ) } ) } ; Graph . prototype . sinks = function ( ) { var self = this ; return _ . filter ( this . nodes ( ) , function ( v ) { return _ . isEmpty ( self . _out [ v ] ) } ) } ; Graph . prototype . setNodes = function ( vs , value ) { var args = arguments ; var self = this ; _ . each ( vs , function ( v ) { if ( args . length > 1 ) { self . setNode ( v , value ) } else { self . setNode ( v ) } } ) ; return this } ; Graph . prototype . setNode = function ( v , value ) { if ( _ . has ( this . _nodes , v ) ) { if ( arguments . length > 1 ) { this . _nodes [ v ] = value } return this } this . _nodes [ v ] = arguments . length > 1 ? value : this . _defaultNodeLabelFn ( v ) ; if ( this . _isCompound ) { this . _parent [ v ] = GRAPH _NODE ; this . _children [ v ] = { } ; this . _children [ GRAPH _NODE ] [ v ] = true } this . _in [ v ] = { } ; this . _preds [ v ] = { } ; this . _out [ v ] = { } ; this . _sucs [ v ] = { } ; ++ this . _nodeCount ; return this } ; Graph . prototype . node = function ( v ) { return this . _nodes [ v ] } ; Graph . prototype . hasNode = function ( v ) { return _ . has ( this . _nodes , v ) } ; Graph . prototype . removeNode = function ( v ) { var self = this ; if ( _ . has ( this . _nodes , v ) ) { var removeEdge = function ( e ) { self . removeEdge ( self . _edgeObjs [ e ] ) } ; delete this . _nodes [ v ] ; if ( this . _isCompound ) { this . _removeFromParentsChildList ( v ) ; delete this . _parent [ v ] ; _ . each ( this . children ( v ) , function ( child ) { self . setParent ( child ) } ) ; delete this . _children [ v ] } _ . each ( _ . keys ( this . _in [ v ] ) , removeEdge ) ; delete this . _in [ v ] ; delete this . _preds [ v ] ; _ . each ( _ . keys ( this . _out [ v ] ) , removeEdge ) ; delete this . _out [ v ] ; delete this . _sucs [ v ] ; -- this . _nodeCount } return this } ; Graph . prototype . setParent = function ( v , parent ) { if ( ! this . _isCompound ) { throw new Error ( "Cannot set parent in a non-compound graph" ) } if ( _ . isUndefined ( parent ) ) { parent = GRAPH _NODE } else {
// Coerce parent to string
parent += "" ; for ( var ancestor = parent ; ! _ . isUndefined ( ancestor ) ; ancestor = this . parent ( ancestor ) ) { if ( ancestor === v ) { throw new Error ( "Setting " + parent + " as parent of " + v + " would create a cycle" ) } } this . setNode ( parent ) } this . setNode ( v ) ; this . _removeFromParentsChildList ( v ) ; this . _parent [ v ] = parent ; this . _children [ parent ] [ v ] = true ; return this } ; Graph . prototype . _removeFromParentsChildList = function ( v ) { delete this . _children [ this . _parent [ v ] ] [ v ] } ; Graph . prototype . parent = function ( v ) { if ( this . _isCompound ) { var parent = this . _parent [ v ] ; if ( parent !== GRAPH _NODE ) { return parent } } } ; Graph . prototype . children = function ( v ) { if ( _ . isUndefined ( v ) ) { v = GRAPH _NODE } if ( this . _isCompound ) { var children = this . _children [ v ] ; if ( children ) { return _ . keys ( children ) } } else if ( v === GRAPH _NODE ) { return this . nodes ( ) } else if ( this . hasNode ( v ) ) { return [ ] } } ; Graph . prototype . predecessors = function ( v ) { var predsV = this . _preds [ v ] ; if ( predsV ) { return _ . keys ( predsV ) } } ; Graph . prototype . successors = function ( v ) { var sucsV = this . _sucs [ v ] ; if ( sucsV ) { return _ . keys ( sucsV ) } } ; Graph . prototype . neighbors = function ( v ) { var preds = this . predecessors ( v ) ; if ( preds ) { return _ . union ( preds , this . successors ( v ) ) } } ; Graph . prototype . isLeaf = function ( v ) { var neighbors ; if ( this . isDirected ( ) ) { neighbors = this . successors ( v ) } else { neighbors = this . neighbors ( v ) } return neighbors . length === 0 } ; Graph . prototype . filterNodes = function ( filter ) { var copy = new this . constructor ( { directed : this . _isDirected , multigraph : this . _isMultigraph , compound : this . _isCompound } ) ; copy . setGraph ( this . graph ( ) ) ; var self = this ; _ . each ( this . _nodes , function ( value , v ) { if ( filter ( v ) ) { copy . setNode ( v , value ) } } ) ; _ . each ( this . _edgeObjs , function ( e ) { if ( copy . hasNode ( e . v ) && copy . hasNode ( e . w ) ) { copy . setEdge ( e , self . edge ( e ) ) } } ) ; var parents = { } ; function findParent ( v ) { var parent = self . parent ( v ) ; if ( parent === undefined || copy . hasNode ( parent ) ) { parents [ v ] = parent ; return parent } else if ( parent in parents ) { return parents [ parent ] } else { return findParent ( parent ) } } if ( this . _isCompound ) { _ . each ( copy . nodes ( ) , function ( v ) { copy . setParent ( v , findParent ( v ) ) } ) } return copy } ;
/* === Edge functions ========== */ Graph . prototype . setDefaultEdgeLabel = function ( newDefault ) { if ( ! _ . isFunction ( newDefault ) ) { newDefault = _ . constant ( newDefault ) } this . _defaultEdgeLabelFn = newDefault ; return this } ; Graph . prototype . edgeCount = function ( ) { return this . _edgeCount } ; Graph . prototype . edges = function ( ) { return _ . values ( this . _edgeObjs ) } ; Graph . prototype . setPath = function ( vs , value ) { var self = this ; var args = arguments ; _ . reduce ( vs , function ( v , w ) { if ( args . length > 1 ) { self . setEdge ( v , w , value ) } else { self . setEdge ( v , w ) } return w } ) ; return this } ;
/ *
* setEdge ( v , w , [ value , [ name ] ] )
* setEdge ( { v , w , [ name ] } , [ value ] )
* / G r a p h . p r o t o t y p e . s e t E d g e = f u n c t i o n ( ) { v a r v , w , n a m e , v a l u e ; v a r v a l u e S p e c i f i e d = f a l s e ; v a r a r g 0 = a r g u m e n t s [ 0 ] ; i f ( t y p e o f a r g 0 = = = " o b j e c t " & & a r g 0 ! = = n u l l & & " v " i n a r g 0 ) { v = a r g 0 . v ; w = a r g 0 . w ; n a m e = a r g 0 . n a m e ; i f ( a r g u m e n t s . l e n g t h = = = 2 ) { v a l u e = a r g u m e n t s [ 1 ] ; v a l u e S p e c i f i e d = t r u e } } e l s e { v = a r g 0 ; w = a r g u m e n t s [ 1 ] ; n a m e = a r g u m e n t s [ 3 ] ; i f ( a r g u m e n t s . l e n g t h > 2 ) { v a l u e = a r g u m e n t s [ 2 ] ; v a l u e S p e c i f i e d = t r u e } } v = " " + v ; w = " " + w ; i f ( ! _ . i s U n d e f i n e d ( n a m e ) ) { n a m e = " " + n a m e } v a r e = e d g e A r g s T o I d ( t h i s . _ i s D i r e c t e d , v , w , n a m e ) ; i f ( _ . h a s ( t h i s . _ e d g e L a b e l s , e ) ) { i f ( v a l u e S p e c i f i e d ) { t h i s . _ e d g e L a b e l s [ e ] = v a l u e } r e t u r n t h i s } i f ( ! _ . i s U n d e f i n e d ( n a m e ) & & ! t h i s . _ i s M u l t i g r a p h ) { t h r o w n e w E r r o r ( " C a n n o t s e t a n a m e d e d g e w h e n i s M u l t i g r a p h = f a l s e " ) }
// It didn't exist, so we need to create it.
// First ensure the nodes exist.
this . setNode ( v ) ; this . setNode ( w ) ; this . _edgeLabels [ e ] = valueSpecified ? value : this . _defaultEdgeLabelFn ( v , w , name ) ; var edgeObj = edgeArgsToObj ( this . _isDirected , v , w , name ) ;
// Ensure we add undirected edges in a consistent way.
v = edgeObj . v ; w = edgeObj . w ; Object . freeze ( edgeObj ) ; this . _edgeObjs [ e ] = edgeObj ; incrementOrInitEntry ( this . _preds [ w ] , v ) ; incrementOrInitEntry ( this . _sucs [ v ] , w ) ; this . _in [ w ] [ e ] = edgeObj ; this . _out [ v ] [ e ] = edgeObj ; this . _edgeCount ++ ; return this } ; Graph . prototype . edge = function ( v , w , name ) { var e = arguments . length === 1 ? edgeObjToId ( this . _isDirected , arguments [ 0 ] ) : edgeArgsToId ( this . _isDirected , v , w , name ) ; return this . _edgeLabels [ e ] } ; Graph . prototype . hasEdge = function ( v , w , name ) { var e = arguments . length === 1 ? edgeObjToId ( this . _isDirected , arguments [ 0 ] ) : edgeArgsToId ( this . _isDirected , v , w , name ) ; return _ . has ( this . _edgeLabels , e ) } ; Graph . prototype . removeEdge = function ( v , w , name ) { var e = arguments . length === 1 ? edgeObjToId ( this . _isDirected , arguments [ 0 ] ) : edgeArgsToId ( this . _isDirected , v , w , name ) ; var edge = this . _edgeObjs [ e ] ; if ( edge ) { v = edge . v ; w = edge . w ; delete this . _edgeLabels [ e ] ; delete this . _edgeObjs [ e ] ; decrementOrRemoveEntry ( this . _preds [ w ] , v ) ; decrementOrRemoveEntry ( this . _sucs [ v ] , w ) ; delete this . _in [ w ] [ e ] ; delete this . _out [ v ] [ e ] ; this . _edgeCount -- } return this } ; Graph . prototype . inEdges = function ( v , u ) { var inV = this . _in [ v ] ; if ( inV ) { var edges = _ . values ( inV ) ; if ( ! u ) { return edges } return _ . filter ( edges , function ( edge ) { return edge . v === u } ) } } ; Graph . prototype . outEdges = function ( v , w ) { var outV = this . _out [ v ] ; if ( outV ) { var edges = _ . values ( outV ) ; if ( ! w ) { return edges } return _ . filter ( edges , function ( edge ) { return edge . w === w } ) } } ; Graph . prototype . nodeEdges = function ( v , w ) { var inEdges = this . inEdges ( v , w ) ; if ( inEdges ) { return inEdges . concat ( this . outEdges ( v , w ) ) } } ; function incrementOrInitEntry ( map , k ) { if ( map [ k ] ) { map [ k ] ++ } else { map [ k ] = 1 } } function decrementOrRemoveEntry ( map , k ) { if ( ! -- map [ k ] ) { delete map [ k ] } } function edgeArgsToId ( isDirected , v _ , w _ , name ) { var v = "" + v _ ; var w = "" + w _ ; if ( ! isDirected && v > w ) { var tmp = v ; v = w ; w = tmp } return v + EDGE _KEY _DELIM + w + EDGE _KEY _DELIM + ( _ . isUndefined ( name ) ? DEFAULT _EDGE _NAME : name ) } function edgeArgsToObj ( isDirected , v _ , w _ , name ) { var v = "" + v _ ; var w = "" + w _ ; if ( ! isDirected && v > w ) { var tmp = v ; v = w ; w = tmp } var edgeObj = { v : v , w : w } ; if ( name ) { edgeObj . name = name } return edgeObj } function edgeObjToId ( isDirected , edgeObj ) { return edgeArgsToId ( isDirected , edgeObj . v , edgeObj . w , edgeObj . name ) } } , { "./lodash" : 49 } ] , 47 : [ function ( require , module , exports ) {
// Includes only the "core" of graphlib
module . exports = { Graph : require ( "./graph" ) , version : require ( "./version" ) } } , { "./graph" : 46 , "./version" : 50 } ] , 48 : [ function ( require , module , exports ) { var _ = require ( "./lodash" ) ; var Graph = require ( "./graph" ) ; module . exports = { write : write , read : read } ; function write ( g ) { var json = { options : { directed : g . isDirected ( ) , multigraph : g . isMultigraph ( ) , compound : g . isCompound ( ) } , nodes : writeNodes ( g ) , edges : writeEdges ( g ) } ; if ( ! _ . isUndefined ( g . graph ( ) ) ) { json . value = _ . clone ( g . graph ( ) ) } return json } function writeNodes ( g ) { return _ . map ( g . nodes ( ) , function ( v ) { var nodeValue = g . node ( v ) ; var parent = g . parent ( v ) ; var node = { v : v } ; if ( ! _ . isUndefined ( nodeValue ) ) { node . value = nodeValue } if ( ! _ . isUndefined ( parent ) ) { node . parent = parent } return node } ) } function writeEdges ( g ) { return _ . map ( g . edges ( ) , function ( e ) { var edgeValue = g . edge ( e ) ; var edge = { v : e . v , w : e . w } ; if ( ! _ . isUndefined ( e . name ) ) { edge . name = e . name } if ( ! _ . isUndefined ( edgeValue ) ) { edge . value = edgeValue } return edge } ) } function read ( json ) { var g = new Graph ( json . options ) . setGraph ( json . value ) ; _ . each ( json . nodes , function ( entry ) { g . setNode ( entry . v , entry . value ) ; if ( entry . parent ) { g . setParent ( entry . v , entry . parent ) } } ) ; _ . each ( json . edges , function ( entry ) { g . setEdge ( { v : entry . v , w : entry . w , name : entry . name } , entry . value ) } ) ; return g } } , { "./graph" : 46 , "./lodash" : 49 } ] , 49 : [ function ( require , module , exports ) {
/* global window */
var lodash ; if ( typeof require === "function" ) { try { lodash = { clone : require ( "lodash/clone" ) , constant : require ( "lodash/constant" ) , each : require ( "lodash/each" ) , filter : require ( "lodash/filter" ) , has : require ( "lodash/has" ) , isArray : require ( "lodash/isArray" ) , isEmpty : require ( "lodash/isEmpty" ) , isFunction : require ( "lodash/isFunction" ) , isUndefined : require ( "lodash/isUndefined" ) , keys : require ( "lodash/keys" ) , map : require ( "lodash/map" ) , reduce : require ( "lodash/reduce" ) , size : require ( "lodash/size" ) , transform : require ( "lodash/transform" ) , union : require ( "lodash/union" ) , values : require ( "lodash/values" ) } } catch ( e ) {
// continue regardless of error
} } if ( ! lodash ) { lodash = window . _ } module . exports = lodash } , { "lodash/clone" : 226 , "lodash/constant" : 228 , "lodash/each" : 230 , "lodash/filter" : 232 , "lodash/has" : 239 , "lodash/isArray" : 243 , "lodash/isEmpty" : 247 , "lodash/isFunction" : 248 , "lodash/isUndefined" : 258 , "lodash/keys" : 259 , "lodash/map" : 262 , "lodash/reduce" : 274 , "lodash/size" : 275 , "lodash/transform" : 284 , "lodash/union" : 285 , "lodash/values" : 287 } ] , 50 : [ function ( require , module , exports ) { module . exports = "2.1.8" } , { } ] , 51 : [ function ( require , module , exports ) { var getNative = require ( "./_getNative" ) , root = require ( "./_root" ) ;
/* Built-in method references that are verified to be native. */ var DataView = getNative ( root , "DataView" ) ; module . exports = DataView } , { "./_getNative" : 163 , "./_root" : 208 } ] , 52 : [ function ( require , module , exports ) { var hashClear = require ( "./_hashClear" ) , hashDelete = require ( "./_hashDelete" ) , hashGet = require ( "./_hashGet" ) , hashHas = require ( "./_hashHas" ) , hashSet = require ( "./_hashSet" ) ;
/ * *
* Creates a hash object .
*
* @ private
* @ constructor
* @ param { Array } [ entries ] The key - value pairs to cache .
* / f u n c t i o n H a s h ( e n t r i e s ) { v a r i n d e x = - 1 , l e n g t h = e n t r i e s = = n u l l ? 0 : e n t r i e s . l e n g t h ; t h i s . c l e a r ( ) ; w h i l e ( + + i n d e x < l e n g t h ) { v a r e n t r y = e n t r i e s [ i n d e x ] ; t h i s . s e t ( e n t r y [ 0 ] , e n t r y [ 1 ] ) } }
// Add methods to `Hash`.
Hash . prototype . clear = hashClear ; Hash . prototype [ "delete" ] = hashDelete ; Hash . prototype . get = hashGet ; Hash . prototype . has = hashHas ; Hash . prototype . set = hashSet ; module . exports = Hash } , { "./_hashClear" : 172 , "./_hashDelete" : 173 , "./_hashGet" : 174 , "./_hashHas" : 175 , "./_hashSet" : 176 } ] , 53 : [ function ( require , module , exports ) { var listCacheClear = require ( "./_listCacheClear" ) , listCacheDelete = require ( "./_listCacheDelete" ) , listCacheGet = require ( "./_listCacheGet" ) , listCacheHas = require ( "./_listCacheHas" ) , listCacheSet = require ( "./_listCacheSet" ) ;
/ * *
* Creates an list cache object .
*
* @ private
* @ constructor
* @ param { Array } [ entries ] The key - value pairs to cache .
* / f u n c t i o n L i s t C a c h e ( e n t r i e s ) { v a r i n d e x = - 1 , l e n g t h = e n t r i e s = = n u l l ? 0 : e n t r i e s . l e n g t h ; t h i s . c l e a r ( ) ; w h i l e ( + + i n d e x < l e n g t h ) { v a r e n t r y = e n t r i e s [ i n d e x ] ; t h i s . s e t ( e n t r y [ 0 ] , e n t r y [ 1 ] ) } }
// Add methods to `ListCache`.
ListCache . prototype . clear = listCacheClear ; ListCache . prototype [ "delete" ] = listCacheDelete ; ListCache . prototype . get = listCacheGet ; ListCache . prototype . has = listCacheHas ; ListCache . prototype . set = listCacheSet ; module . exports = ListCache } , { "./_listCacheClear" : 188 , "./_listCacheDelete" : 189 , "./_listCacheGet" : 190 , "./_listCacheHas" : 191 , "./_listCacheSet" : 192 } ] , 54 : [ function ( require , module , exports ) { var getNative = require ( "./_getNative" ) , root = require ( "./_root" ) ;
/* Built-in method references that are verified to be native. */ var Map = getNative ( root , "Map" ) ; module . exports = Map } , { "./_getNative" : 163 , "./_root" : 208 } ] , 55 : [ function ( require , module , exports ) { var mapCacheClear = require ( "./_mapCacheClear" ) , mapCacheDelete = require ( "./_mapCacheDelete" ) , mapCacheGet = require ( "./_mapCacheGet" ) , mapCacheHas = require ( "./_mapCacheHas" ) , mapCacheSet = require ( "./_mapCacheSet" ) ;
/ * *
* Creates a map cache object to store key - value pairs .
*
* @ private
* @ constructor
* @ param { Array } [ entries ] The key - value pairs to cache .
* / f u n c t i o n M a p C a c h e ( e n t r i e s ) { v a r i n d e x = - 1 , l e n g t h = e n t r i e s = = n u l l ? 0 : e n t r i e s . l e n g t h ; t h i s . c l e a r ( ) ; w h i l e ( + + i n d e x < l e n g t h ) { v a r e n t r y = e n t r i e s [ i n d e x ] ; t h i s . s e t ( e n t r y [ 0 ] , e n t r y [ 1 ] ) } }
// Add methods to `MapCache`.
MapCache . prototype . clear = mapCacheClear ; MapCache . prototype [ "delete" ] = mapCacheDelete ; MapCache . prototype . get = mapCacheGet ; MapCache . prototype . has = mapCacheHas ; MapCache . prototype . set = mapCacheSet ; module . exports = MapCache } , { "./_mapCacheClear" : 193 , "./_mapCacheDelete" : 194 , "./_mapCacheGet" : 195 , "./_mapCacheHas" : 196 , "./_mapCacheSet" : 197 } ] , 56 : [ function ( require , module , exports ) { var getNative = require ( "./_getNative" ) , root = require ( "./_root" ) ;
/* Built-in method references that are verified to be native. */ var Promise = getNative ( root , "Promise" ) ; module . exports = Promise } , { "./_getNative" : 163 , "./_root" : 208 } ] , 57 : [ function ( require , module , exports ) { var getNative = require ( "./_getNative" ) , root = require ( "./_root" ) ;
/* Built-in method references that are verified to be native. */ var Set = getNative ( root , "Set" ) ; module . exports = Set } , { "./_getNative" : 163 , "./_root" : 208 } ] , 58 : [ function ( require , module , exports ) { var MapCache = require ( "./_MapCache" ) , setCacheAdd = require ( "./_setCacheAdd" ) , setCacheHas = require ( "./_setCacheHas" ) ;
/ * *
*
* Creates an array cache object to store unique values .
*
* @ private
* @ constructor
* @ param { Array } [ values ] The values to cache .
* / f u n c t i o n S e t C a c h e ( v a l u e s ) { v a r i n d e x = - 1 , l e n g t h = v a l u e s = = n u l l ? 0 : v a l u e s . l e n g t h ; t h i s . _ _ d a t a _ _ = n e w M a p C a c h e ; w h i l e ( + + i n d e x < l e n g t h ) { t h i s . a d d ( v a l u e s [ i n d e x ] ) } }
// Add methods to `SetCache`.
SetCache . prototype . add = SetCache . prototype . push = setCacheAdd ; SetCache . prototype . has = setCacheHas ; module . exports = SetCache } , { "./_MapCache" : 55 , "./_setCacheAdd" : 210 , "./_setCacheHas" : 211 } ] , 59 : [ function ( require , module , exports ) { var ListCache = require ( "./_ListCache" ) , stackClear = require ( "./_stackClear" ) , stackDelete = require ( "./_stackDelete" ) , stackGet = require ( "./_stackGet" ) , stackHas = require ( "./_stackHas" ) , stackSet = require ( "./_stackSet" ) ;
/ * *
* Creates a stack cache object to store key - value pairs .
*
* @ private
* @ constructor
* @ param { Array } [ entries ] The key - value pairs to cache .
* / f u n c t i o n S t a c k ( e n t r i e s ) { v a r d a t a = t h i s . _ _ d a t a _ _ = n e w L i s t C a c h e ( e n t r i e s ) ; t h i s . s i z e = d a t a . s i z e }
// Add methods to `Stack`.
Stack . prototype . clear = stackClear ; Stack . prototype [ "delete" ] = stackDelete ; Stack . prototype . get = stackGet ; Stack . prototype . has = stackHas ; Stack . prototype . set = stackSet ; module . exports = Stack } , { "./_ListCache" : 53 , "./_stackClear" : 215 , "./_stackDelete" : 216 , "./_stackGet" : 217 , "./_stackHas" : 218 , "./_stackSet" : 219 } ] , 60 : [ function ( require , module , exports ) { var root = require ( "./_root" ) ;
/** Built-in value references. */ var Symbol = root . Symbol ; module . exports = Symbol } , { "./_root" : 208 } ] , 61 : [ function ( require , module , exports ) { var root = require ( "./_root" ) ;
/** Built-in value references. */ var Uint8Array = root . Uint8Array ; module . exports = Uint8Array } , { "./_root" : 208 } ] , 62 : [ function ( require , module , exports ) { var getNative = require ( "./_getNative" ) , root = require ( "./_root" ) ;
/* Built-in method references that are verified to be native. */ var WeakMap = getNative ( root , "WeakMap" ) ; module . exports = WeakMap } , { "./_getNative" : 163 , "./_root" : 208 } ] , 63 : [ function ( require , module , exports ) {
/ * *
* A faster alternative to ` Function#apply ` , this function invokes ` func `
* with the ` this ` binding of ` thisArg ` and the arguments of ` args ` .
*
* @ private
* @ param { Function } func The function to invoke .
* @ param { * } thisArg The ` this ` binding of ` func ` .
* @ param { Array } args The arguments to invoke ` func ` with .
* @ returns { * } Returns the result of ` func ` .
* /
function apply ( func , thisArg , args ) { switch ( args . length ) { case 0 : return func . call ( thisArg ) ; case 1 : return func . call ( thisArg , args [ 0 ] ) ; case 2 : return func . call ( thisArg , args [ 0 ] , args [ 1 ] ) ; case 3 : return func . call ( thisArg , args [ 0 ] , args [ 1 ] , args [ 2 ] ) } return func . apply ( thisArg , args ) } module . exports = apply } , { } ] , 64 : [ function ( require , module , exports ) {
/ * *
* A specialized version of ` _.forEach ` for arrays without support for
* iteratee shorthands .
*
* @ private
* @ param { Array } [ array ] The array to iterate over .
* @ param { Function } iteratee The function invoked per iteration .
* @ returns { Array } Returns ` array ` .
* /
function arrayEach ( array , iteratee ) { var index = - 1 , length = array == null ? 0 : array . length ; while ( ++ index < length ) { if ( iteratee ( array [ index ] , index , array ) === false ) { break } } return array } module . exports = arrayEach } , { } ] , 65 : [ function ( require , module , exports ) {
/ * *
* A specialized version of ` _.filter ` for arrays without support for
* iteratee shorthands .
*
* @ private
* @ param { Array } [ array ] The array to iterate over .
* @ param { Function } predicate The function invoked per iteration .
* @ returns { Array } Returns the new filtered array .
* /
function arrayFilter ( array , predicate ) { var index = - 1 , length = array == null ? 0 : array . length , resIndex = 0 , result = [ ] ; while ( ++ index < length ) { var value = array [ index ] ; if ( predicate ( value , index , array ) ) { result [ resIndex ++ ] = value } } return result } module . exports = arrayFilter } , { } ] , 66 : [ function ( require , module , exports ) { var baseIndexOf = require ( "./_baseIndexOf" ) ;
/ * *
* A specialized version of ` _.includes ` for arrays without support for
* specifying an index to search from .
*
* @ private
* @ param { Array } [ array ] The array to inspect .
* @ param { * } target The value to search for .
* @ returns { boolean } Returns ` true ` if ` target ` is found , else ` false ` .
* / f u n c t i o n a r r a y I n c l u d e s ( a r r a y , v a l u e ) { v a r l e n g t h = a r r a y = = n u l l ? 0 : a r r a y . l e n g t h ; r e t u r n ! ! l e n g t h & & b a s e I n d e x O f ( a r r a y , v a l u e , 0 ) > - 1 } m o d u l e . e x p o r t s = a r r a y I n c l u d e s } , { " . / _ b a s e I n d e x O f " : 9 5 } ] , 6 7 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) {
/ * *
* This function is like ` arrayIncludes ` except that it accepts a comparator .
*
* @ private
* @ param { Array } [ array ] The array to inspect .
* @ param { * } target The value to search for .
* @ param { Function } comparator The comparator invoked per element .
* @ returns { boolean } Returns ` true ` if ` target ` is found , else ` false ` .
* /
function arrayIncludesWith ( array , value , comparator ) { var index = - 1 , length = array == null ? 0 : array . length ; while ( ++ index < length ) { if ( comparator ( value , array [ index ] ) ) { return true } } return false } module . exports = arrayIncludesWith } , { } ] , 68 : [ function ( require , module , exports ) { var baseTimes = require ( "./_baseTimes" ) , isArguments = require ( "./isArguments" ) , isArray = require ( "./isArray" ) , isBuffer = require ( "./isBuffer" ) , isIndex = require ( "./_isIndex" ) , isTypedArray = require ( "./isTypedArray" ) ;
/** Used for built-in method references. */ var objectProto = Object . prototype ;
/** Used to check objects for own properties. */ var hasOwnProperty = objectProto . hasOwnProperty ;
/ * *
* Creates an array of the enumerable property names of the array - like ` value ` .
*
* @ private
* @ param { * } value The value to query .
* @ param { boolean } inherited Specify returning inherited property names .
* @ returns { Array } Returns the array of property names .
* / f u n c t i o n a r r a y L i k e K e y s ( v a l u e , i n h e r i t e d ) { v a r i s A r r = i s A r r a y ( v a l u e ) , i s A r g = ! i s A r r & & i s A r g u m e n t s ( v a l u e ) , i s B u f f = ! i s A r r & & ! i s A r g & & i s B u f f e r ( v a l u e ) , i s T y p e = ! i s A r r & & ! i s A r g & & ! i s B u f f & & i s T y p e d A r r a y ( v a l u e ) , s k i p I n d e x e s = i s A r r | | i s A r g | | i s B u f f | | i s T y p e , r e s u l t = s k i p I n d e x e s ? b a s e T i m e s ( v a l u e . l e n g t h , S t r i n g ) : [ ] , l e n g t h = r e s u l t . l e n g t h ; f o r ( v a r k e y i n v a l u e ) { i f ( ( i n h e r i t e d | | h a s O w n P r o p e r t y . c a l l ( v a l u e , k e y ) ) & & ! ( s k i p I n d e x e s & & (
// Safari 9 has enumerable `arguments.length` in strict mode.
key == "length" ||
// Node.js 0.10 has enumerable non-index properties on buffers.
isBuff && ( key == "offset" || key == "parent" ) ||
// PhantomJS 2 has enumerable non-index properties on typed arrays.
isType && ( key == "buffer" || key == "byteLength" || key == "byteOffset" ) ||
// Skip index properties.
isIndex ( key , length ) ) ) ) { result . push ( key ) } } return result } module . exports = arrayLikeKeys } , { "./_baseTimes" : 125 , "./_isIndex" : 181 , "./isArguments" : 242 , "./isArray" : 243 , "./isBuffer" : 246 , "./isTypedArray" : 257 } ] , 69 : [ function ( require , module , exports ) {
/ * *
* A specialized version of ` _.map ` for arrays without support for iteratee
* shorthands .
*
* @ private
* @ param { Array } [ array ] The array to iterate over .
* @ param { Function } iteratee The function invoked per iteration .
* @ returns { Array } Returns the new mapped array .
* /
function arrayMap ( array , iteratee ) { var index = - 1 , length = array == null ? 0 : array . length , result = Array ( length ) ; while ( ++ index < length ) { result [ index ] = iteratee ( array [ index ] , index , array ) } return result } module . exports = arrayMap } , { } ] , 70 : [ function ( require , module , exports ) {
/ * *
* Appends the elements of ` values ` to ` array ` .
*
* @ private
* @ param { Array } array The array to modify .
* @ param { Array } values The values to append .
* @ returns { Array } Returns ` array ` .
* /
function arrayPush ( array , values ) { var index = - 1 , length = values . length , offset = array . length ; while ( ++ index < length ) { array [ offset + index ] = values [ index ] } return array } module . exports = arrayPush } , { } ] , 71 : [ function ( require , module , exports ) {
/ * *
* A specialized version of ` _.reduce ` for arrays without support for
* iteratee shorthands .
*
* @ private
* @ param { Array } [ array ] The array to iterate over .
* @ param { Function } iteratee The function invoked per iteration .
* @ param { * } [ accumulator ] The initial value .
* @ param { boolean } [ initAccum ] Specify using the first element of ` array ` as
* the initial value .
* @ returns { * } Returns the accumulated value .
* /
function arrayReduce ( array , iteratee , accumulator , initAccum ) { var index = - 1 , length = array == null ? 0 : array . length ; if ( initAccum && length ) { accumulator = array [ ++ index ] } while ( ++ index < length ) { accumulator = iteratee ( accumulator , array [ index ] , index , array ) } return accumulator } module . exports = arrayReduce } , { } ] , 72 : [ function ( require , module , exports ) {
/ * *
* A specialized version of ` _.some ` for arrays without support for iteratee
* shorthands .
*
* @ private
* @ param { Array } [ array ] The array to iterate over .
* @ param { Function } predicate The function invoked per iteration .
* @ returns { boolean } Returns ` true ` if any element passes the predicate check ,
* else ` false ` .
* /
function arraySome ( array , predicate ) { var index = - 1 , length = array == null ? 0 : array . length ; while ( ++ index < length ) { if ( predicate ( array [ index ] , index , array ) ) { return true } } return false } module . exports = arraySome } , { } ] , 73 : [ function ( require , module , exports ) { var baseProperty = require ( "./_baseProperty" ) ;
/ * *
* Gets the size of an ASCII ` string ` .
*
* @ private
* @ param { string } string The string inspect .
* @ returns { number } Returns the string size .
* / v a r a s c i i S i z e = b a s e P r o p e r t y ( " l e n g t h " ) ; m o d u l e . e x p o r t s = a s c i i S i z e } , { " . / _ b a s e P r o p e r t y " : 1 1 7 } ] , 7 4 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r b a s e A s s i g n V a l u e = r e q u i r e ( " . / _ b a s e A s s i g n V a l u e " ) , e q = r e q u i r e ( " . / e q " ) ;
/ * *
* This function is like ` assignValue ` except that it doesn ' t assign
* ` undefined ` values .
*
* @ private
* @ param { Object } object The object to modify .
* @ param { string } key The key of the property to assign .
* @ param { * } value The value to assign .
* / f u n c t i o n a s s i g n M e r g e V a l u e ( o b j e c t , k e y , v a l u e ) { i f ( v a l u e ! = = u n d e f i n e d & & ! e q ( o b j e c t [ k e y ] , v a l u e ) | | v a l u e = = = u n d e f i n e d & & ! ( k e y i n o b j e c t ) ) { b a s e A s s i g n V a l u e ( o b j e c t , k e y , v a l u e ) } } m o d u l e . e x p o r t s = a s s i g n M e r g e V a l u e } , { " . / _ b a s e A s s i g n V a l u e " : 7 9 , " . / e q " : 2 3 1 } ] , 7 5 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r b a s e A s s i g n V a l u e = r e q u i r e ( " . / _ b a s e A s s i g n V a l u e " ) , e q = r e q u i r e ( " . / e q " ) ;
/** Used for built-in method references. */ var objectProto = Object . prototype ;
/** Used to check objects for own properties. */ var hasOwnProperty = objectProto . hasOwnProperty ;
/ * *
* Assigns ` value ` to ` key ` of ` object ` if the existing value is not equivalent
* using [ ` SameValueZero ` ] ( http : //ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* for equality comparisons .
*
* @ private
* @ param { Object } object The object to modify .
* @ param { string } key The key of the property to assign .
* @ param { * } value The value to assign .
* / f u n c t i o n a s s i g n V a l u e ( o b j e c t , k e y , v a l u e ) { v a r o b j V a l u e = o b j e c t [ k e y ] ; i f ( ! ( h a s O w n P r o p e r t y . c a l l ( o b j e c t , k e y ) & & e q ( o b j V a l u e , v a l u e ) ) | | v a l u e = = = u n d e f i n e d & & ! ( k e y i n o b j e c t ) ) { b a s e A s s i g n V a l u e ( o b j e c t , k e y , v a l u e ) } } m o d u l e . e x p o r t s = a s s i g n V a l u e } , { " . / _ b a s e A s s i g n V a l u e " : 7 9 , " . / e q " : 2 3 1 } ] , 7 6 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r e q = r e q u i r e ( " . / e q " ) ;
/ * *
* Gets the index at which the ` key ` is found in ` array ` of key - value pairs .
*
* @ private
* @ param { Array } array The array to inspect .
* @ param { * } key The key to search for .
* @ returns { number } Returns the index of the matched value , else ` -1 ` .
* / f u n c t i o n a s s o c I n d e x O f ( a r r a y , k e y ) { v a r l e n g t h = a r r a y . l e n g t h ; w h i l e ( l e n g t h - - ) { i f ( e q ( a r r a y [ l e n g t h ] [ 0 ] , k e y ) ) { r e t u r n l e n g t h } } r e t u r n - 1 } m o d u l e . e x p o r t s = a s s o c I n d e x O f } , { " . / e q " : 2 3 1 } ] , 7 7 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r c o p y O b j e c t = r e q u i r e ( " . / _ c o p y O b j e c t " ) , k e y s = r e q u i r e ( " . / k e y s " ) ;
/ * *
* The base implementation of ` _.assign ` without support for multiple sources
* or ` customizer ` functions .
*
* @ private
* @ param { Object } object The destination object .
* @ param { Object } source The source object .
* @ returns { Object } Returns ` object ` .
* / f u n c t i o n b a s e A s s i g n ( o b j e c t , s o u r c e ) { r e t u r n o b j e c t & & c o p y O b j e c t ( s o u r c e , k e y s ( s o u r c e ) , o b j e c t ) } m o d u l e . e x p o r t s = b a s e A s s i g n } , { " . / _ c o p y O b j e c t " : 1 4 3 , " . / k e y s " : 2 5 9 } ] , 7 8 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r c o p y O b j e c t = r e q u i r e ( " . / _ c o p y O b j e c t " ) , k e y s I n = r e q u i r e ( " . / k e y s I n " ) ;
/ * *
* The base implementation of ` _.assignIn ` without support for multiple sources
* or ` customizer ` functions .
*
* @ private
* @ param { Object } object The destination object .
* @ param { Object } source The source object .
* @ returns { Object } Returns ` object ` .
* / f u n c t i o n b a s e A s s i g n I n ( o b j e c t , s o u r c e ) { r e t u r n o b j e c t & & c o p y O b j e c t ( s o u r c e , k e y s I n ( s o u r c e ) , o b j e c t ) } m o d u l e . e x p o r t s = b a s e A s s i g n I n } , { " . / _ c o p y O b j e c t " : 1 4 3 , " . / k e y s I n " : 2 6 0 } ] , 7 9 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r d e f i n e P r o p e r t y = r e q u i r e ( " . / _ d e f i n e P r o p e r t y " ) ;
/ * *
* The base implementation of ` assignValue ` and ` assignMergeValue ` without
* value checks .
*
* @ private
* @ param { Object } object The object to modify .
* @ param { string } key The key of the property to assign .
* @ param { * } value The value to assign .
* / f u n c t i o n b a s e A s s i g n V a l u e ( o b j e c t , k e y , v a l u e ) { i f ( k e y = = " _ _ p r o t o _ _ " & & d e f i n e P r o p e r t y ) { d e f i n e P r o p e r t y ( o b j e c t , k e y , { c o n f i g u r a b l e : t r u e , e n u m e r a b l e : t r u e , v a l u e : v a l u e , w r i t a b l e : t r u e } ) } e l s e { o b j e c t [ k e y ] = v a l u e } } m o d u l e . e x p o r t s = b a s e A s s i g n V a l u e } , { " . / _ d e f i n e P r o p e r t y " : 1 5 3 } ] , 8 0 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r S t a c k = r e q u i r e ( " . / _ S t a c k " ) , a r r a y E a c h = r e q u i r e ( " . / _ a r r a y E a c h " ) , a s s i g n V a l u e = r e q u i r e ( " . / _ a s s i g n V a l u e " ) , b a s e A s s i g n = r e q u i r e ( " . / _ b a s e A s s i g n " ) , b a s e A s s i g n I n = r e q u i r e ( " . / _ b a s e A s s i g n I n " ) , c l o n e B u f f e r = r e q u i r e ( " . / _ c l o n e B u f f e r " ) , c o p y A r r a y = r e q u i r e ( " . / _ c o p y A r r a y " ) , c o p y S y m b o l s = r e q u i r e ( " . / _ c o p y S y m b o l s " ) , c o p y S y m b o l s I n = r e q u i r e ( " . / _ c o p y S y m b o l s I n " ) , g e t A l l K e y s = r e q u i r e ( " . / _ g e t A l l K e y s " ) , g e t A l l K e y s I n = r e q u i r e ( " . / _ g e t A l l K e y s I n " ) , g e t T a g = r e q u i r e ( " . / _ g e t T a g " ) , i n i t C l o n e A r r a y = r e q u i r e ( " . / _ i n i t C l o n e A r r a y " ) , i n i t C l o n e B y T a g = r e q u i r e ( " . / _ i n i t C l o n e B y T a g " ) , i n i t C l o n e O b j e c t = r e q u i r e ( " . / _ i n i t C l o n e O b j e c t " ) , i s A r r a y = r e q u i r e ( " . / i s A r r a y " ) , i s B u f f e r = r e q u i r e ( " . / i s B u f f e r " ) , i s M a p = r e q u i r e ( " . / i s M a p " ) , i s O b j e c t = r e q u i r e ( " . / i s O b j e c t " ) , i s S e t = r e q u i r e ( " . / i s S e t " ) , k e y s = r e q u i r e ( " . / k e y s " ) ;
/** Used to compose bitmasks for cloning. */ var CLONE _DEEP _FLAG = 1 , CLONE _FLAT _FLAG = 2 , CLONE _SYMBOLS _FLAG = 4 ;
/** `Object#toString` result references. */ var argsTag = "[object Arguments]" , arrayTag = "[object Array]" , boolTag = "[object Boolean]" , dateTag = "[object Date]" , errorTag = "[object Error]" , funcTag = "[object Function]" , genTag = "[object GeneratorFunction]" , mapTag = "[object Map]" , numberTag = "[object Number]" , objectTag = "[object Object]" , regexpTag = "[object RegExp]" , setTag = "[object Set]" , stringTag = "[object String]" , symbolTag = "[object Symbol]" , weakMapTag = "[object WeakMap]" ; var arrayBufferTag = "[object ArrayBuffer]" , dataViewTag = "[object DataView]" , float32Tag = "[object Float32Array]" , float64Tag = "[object Float64Array]" , int8Tag = "[object Int8Array]" , int16Tag = "[object Int16Array]" , int32Tag = "[object Int32Array]" , uint8Tag = "[object Uint8Array]" , uint8ClampedTag = "[object Uint8ClampedArray]" , uint16Tag = "[object Uint16Array]" , uint32Tag = "[object Uint32Array]" ;
/** Used to identify `toStringTag` values supported by `_.clone`. */ var cloneableTags = { } ; cloneableTags [ argsTag ] = cloneableTags [ arrayTag ] = cloneableTags [ arrayBufferTag ] = cloneableTags [ dataViewTag ] = cloneableTags [ boolTag ] = cloneableTags [ dateTag ] = cloneableTags [ float32Tag ] = cloneableTags [ float64Tag ] = cloneableTags [ int8Tag ] = cloneableTags [ int16Tag ] = cloneableTags [ int32Tag ] = cloneableTags [ mapTag ] = cloneableTags [ numberTag ] = cloneableTags [ objectTag ] = cloneableTags [ regexpTag ] = cloneableTags [ setTag ] = cloneableTags [ stringTag ] = cloneableTags [ symbolTag ] = cloneableTags [ uint8Tag ] = cloneableTags [ uint8ClampedTag ] = cloneableTags [ uint16Tag ] = cloneableTags [ uint32Tag ] = true ; cloneableTags [ errorTag ] = cloneableTags [ funcTag ] = cloneableTags [ weakMapTag ] = false ;
/ * *
* The base implementation of ` _.clone ` and ` _.cloneDeep ` which tracks
* traversed objects .
*
* @ private
* @ param { * } value The value to clone .
* @ param { boolean } bitmask The bitmask flags .
* 1 - Deep clone
* 2 - Flatten inherited properties
* 4 - Clone symbols
* @ param { Function } [ customizer ] The function to customize cloning .
* @ param { string } [ key ] The key of ` value ` .
* @ param { Object } [ object ] The parent object of ` value ` .
* @ param { Object } [ stack ] Tracks traversed objects and their clone counterparts .
* @ returns { * } Returns the cloned value .
* / f u n c t i o n b a s e C l o n e ( v a l u e , b i t m a s k , c u s t o m i z e r , k e y , o b j e c t , s t a c k ) { v a r r e s u l t , i s D e e p = b i t m a s k & C L O N E _ D E E P _ F L A G , i s F l a t = b i t m a s k & C L O N E _ F L A T _ F L A G , i s F u l l = b i t m a s k & C L O N E _ S Y M B O L S _ F L A G ; i f ( c u s t o m i z e r ) { r e s u l t = o b j e c t ? c u s t o m i z e r ( v a l u e , k e y , o b j e c t , s t a c k ) : c u s t o m i z e r ( v a l u e ) } i f ( r e s u l t ! = = u n d e f i n e d ) { r e t u r n r e s u l t } i f ( ! i s O b j e c t ( v a l u e ) ) { r e t u r n v a l u e } v a r i s A r r = i s A r r a y ( v a l u e ) ; i f ( i s A r r ) { r e s u l t = i n i t C l o n e A r r a y ( v a l u e ) ; i f ( ! i s D e e p ) { r e t u r n c o p y A r r a y ( v a l u e , r e s u l t ) } } e l s e { v a r t a g = g e t T a g ( v a l u e ) , i s F u n c = t a g = = f u n c T a g | | t a g = = g e n T a g ; i f ( i s B u f f e r ( v a l u e ) ) { r e t u r n c l o n e B u f f e r ( v a l u e , i s D e e p ) } i f ( t a g = = o b j e c t T a g | | t a g = = a r g s T a g | | i s F u n c & & ! o b j e c t ) { r e s u l t = i s F l a t | | i s F u n c ? { } : i n i t C l o n e O b j e c t ( v a l u e ) ; i f ( ! i s D e e p ) { r e t u r n i s F l a t ? c o p y S y m b o l s I n ( v a l u e , b a s e A s s i g n I n ( r e s u l t , v a l u e ) ) : c o p y S y m b o l s ( v a l u e , b a s e A s s i g n ( r e s u l t , v a l u e ) ) } } e l s e { i f ( ! c l o n e a b l e T a g s [ t a g ] ) { r e t u r n o b j e c t ? v a l u e : { } } r e s u l t = i n i t C l o n e B y T a g ( v a l u e , t a g , i s D e e p ) } }
// Check for circular references and return its corresponding clone.
stack || ( stack = new Stack ) ; var stacked = stack . get ( value ) ; if ( stacked ) { return stacked } stack . set ( value , result ) ; if ( isSet ( value ) ) { value . forEach ( function ( subValue ) { result . add ( baseClone ( subValue , bitmask , customizer , subValue , value , stack ) ) } ) } else if ( isMap ( value ) ) { value . forEach ( function ( subValue , key ) { result . set ( key , baseClone ( subValue , bitmask , customizer , key , value , stack ) ) } ) } var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys ; var props = isArr ? undefined : keysFunc ( value ) ; arrayEach ( props || value , function ( subValue , key ) { if ( props ) { key = subValue ; subValue = value [ key ] }
// Recursively populate clone (susceptible to call stack limits).
assignValue ( result , key , baseClone ( subValue , bitmask , customizer , key , value , stack ) ) } ) ; return result } module . exports = baseClone } , { "./_Stack" : 59 , "./_arrayEach" : 64 , "./_assignValue" : 75 , "./_baseAssign" : 77 , "./_baseAssignIn" : 78 , "./_cloneBuffer" : 135 , "./_copyArray" : 142 , "./_copySymbols" : 144 , "./_copySymbolsIn" : 145 , "./_getAllKeys" : 159 , "./_getAllKeysIn" : 160 , "./_getTag" : 168 , "./_initCloneArray" : 177 , "./_initCloneByTag" : 178 , "./_initCloneObject" : 179 , "./isArray" : 243 , "./isBuffer" : 246 , "./isMap" : 250 , "./isObject" : 251 , "./isSet" : 254 , "./keys" : 259 } ] , 81 : [ function ( require , module , exports ) { var isObject = require ( "./isObject" ) ;
/** Built-in value references. */ var objectCreate = Object . create ;
/ * *
* The base implementation of ` _.create ` without support for assigning
* properties to the created object .
*
* @ private
* @ param { Object } proto The object to inherit from .
* @ returns { Object } Returns the new object .
* / v a r b a s e C r e a t e = f u n c t i o n ( ) { f u n c t i o n o b j e c t ( ) { } r e t u r n f u n c t i o n ( p r o t o ) { i f ( ! i s O b j e c t ( p r o t o ) ) { r e t u r n { } } i f ( o b j e c t C r e a t e ) { r e t u r n o b j e c t C r e a t e ( p r o t o ) } o b j e c t . p r o t o t y p e = p r o t o ; v a r r e s u l t = n e w o b j e c t ; o b j e c t . p r o t o t y p e = u n d e f i n e d ; r e t u r n r e s u l t } } ( ) ; m o d u l e . e x p o r t s = b a s e C r e a t e } , { " . / i s O b j e c t " : 2 5 1 } ] , 8 2 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r b a s e F o r O w n = r e q u i r e ( " . / _ b a s e F o r O w n " ) , c r e a t e B a s e E a c h = r e q u i r e ( " . / _ c r e a t e B a s e E a c h " ) ;
/ * *
* The base implementation of ` _.forEach ` without support for iteratee shorthands .
*
* @ private
* @ param { Array | Object } collection The collection to iterate over .
* @ param { Function } iteratee The function invoked per iteration .
* @ returns { Array | Object } Returns ` collection ` .
* / v a r b a s e E a c h = c r e a t e B a s e E a c h ( b a s e F o r O w n ) ; m o d u l e . e x p o r t s = b a s e E a c h } , { " . / _ b a s e F o r O w n " : 8 8 , " . / _ c r e a t e B a s e E a c h " : 1 4 8 } ] , 8 3 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r i s S y m b o l = r e q u i r e ( " . / i s S y m b o l " ) ;
/ * *
* The base implementation of methods like ` _.max ` and ` _.min ` which accepts a
* ` comparator ` to determine the extremum value .
*
* @ private
* @ param { Array } array The array to iterate over .
* @ param { Function } iteratee The iteratee invoked per iteration .
* @ param { Function } comparator The comparator used to compare values .
* @ returns { * } Returns the extremum value .
* / f u n c t i o n b a s e E x t r e m u m ( a r r a y , i t e r a t e e , c o m p a r a t o r ) { v a r i n d e x = - 1 , l e n g t h = a r r a y . l e n g t h ; w h i l e ( + + i n d e x < l e n g t h ) { v a r v a l u e = a r r a y [ i n d e x ] , c u r r e n t = i t e r a t e e ( v a l u e ) ; i f ( c u r r e n t ! = n u l l & & ( c o m p u t e d = = = u n d e f i n e d ? c u r r e n t = = = c u r r e n t & & ! i s S y m b o l ( c u r r e n t ) : c o m p a r a t o r ( c u r r e n t , c o m p u t e d ) ) ) { v a r c o m p u t e d = c u r r e n t , r e s u l t = v a l u e } } r e t u r n r e s u l t } m o d u l e . e x p o r t s = b a s e E x t r e m u m } , { " . / i s S y m b o l " : 2 5 6 } ] , 8 4 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r b a s e E a c h = r e q u i r e ( " . / _ b a s e E a c h " ) ;
/ * *
* The base implementation of ` _.filter ` without support for iteratee shorthands .
*
* @ private
* @ param { Array | Object } collection The collection to iterate over .
* @ param { Function } predicate The function invoked per iteration .
* @ returns { Array } Returns the new filtered array .
* / f u n c t i o n b a s e F i l t e r ( c o l l e c t i o n , p r e d i c a t e ) { v a r r e s u l t = [ ] ; b a s e E a c h ( c o l l e c t i o n , f u n c t i o n ( v a l u e , i n d e x , c o l l e c t i o n ) { i f ( p r e d i c a t e ( v a l u e , i n d e x , c o l l e c t i o n ) ) { r e s u l t . p u s h ( v a l u e ) } } ) ; r e t u r n r e s u l t } m o d u l e . e x p o r t s = b a s e F i l t e r } , { " . / _ b a s e E a c h " : 8 2 } ] , 8 5 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) {
/ * *
* The base implementation of ` _.findIndex ` and ` _.findLastIndex ` without
* support for iteratee shorthands .
*
* @ private
* @ param { Array } array The array to inspect .
* @ param { Function } predicate The function invoked per iteration .
* @ param { number } fromIndex The index to search from .
* @ param { boolean } [ fromRight ] Specify iterating from right to left .
* @ returns { number } Returns the index of the matched value , else ` -1 ` .
* /
function baseFindIndex ( array , predicate , fromIndex , fromRight ) { var length = array . length , index = fromIndex + ( fromRight ? 1 : - 1 ) ; while ( fromRight ? index -- : ++ index < length ) { if ( predicate ( array [ index ] , index , array ) ) { return index } } return - 1 } module . exports = baseFindIndex } , { } ] , 86 : [ function ( require , module , exports ) { var arrayPush = require ( "./_arrayPush" ) , isFlattenable = require ( "./_isFlattenable" ) ;
/ * *
* The base implementation of ` _.flatten ` with support for restricting flattening .
*
* @ private
* @ param { Array } array The array to flatten .
* @ param { number } depth The maximum recursion depth .
* @ param { boolean } [ predicate = isFlattenable ] The function invoked per iteration .
* @ param { boolean } [ isStrict ] Restrict to values that pass ` predicate ` checks .
* @ param { Array } [ result = [ ] ] The initial result value .
* @ returns { Array } Returns the new flattened array .
* / f u n c t i o n b a s e F l a t t e n ( a r r a y , d e p t h , p r e d i c a t e , i s S t r i c t , r e s u l t ) { v a r i n d e x = - 1 , l e n g t h = a r r a y . l e n g t h ; p r e d i c a t e | | ( p r e d i c a t e = i s F l a t t e n a b l e ) ; r e s u l t | | ( r e s u l t = [ ] ) ; w h i l e ( + + i n d e x < l e n g t h ) { v a r v a l u e = a r r a y [ i n d e x ] ; i f ( d e p t h > 0 & & p r e d i c a t e ( v a l u e ) ) { i f ( d e p t h > 1 ) {
// Recursively flatten arrays (susceptible to call stack limits).
baseFlatten ( value , depth - 1 , predicate , isStrict , result ) } else { arrayPush ( result , value ) } } else if ( ! isStrict ) { result [ result . length ] = value } } return result } module . exports = baseFlatten } , { "./_arrayPush" : 70 , "./_isFlattenable" : 180 } ] , 87 : [ function ( require , module , exports ) { var createBaseFor = require ( "./_createBaseFor" ) ;
/ * *
* The base implementation of ` baseForOwn ` which iterates over ` object `
* properties returned by ` keysFunc ` and invokes ` iteratee ` for each property .
* Iteratee functions may exit iteration early by explicitly returning ` false ` .
*
* @ private
* @ param { Object } object The object to iterate over .
* @ param { Function } iteratee The function invoked per iteration .
* @ param { Function } keysFunc The function to get the keys of ` object ` .
* @ returns { Object } Returns ` object ` .
* / v a r b a s e F o r = c r e a t e B a s e F o r ( ) ; m o d u l e . e x p o r t s = b a s e F o r } , { " . / _ c r e a t e B a s e F o r " : 1 4 9 } ] , 8 8 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r b a s e F o r = r e q u i r e ( " . / _ b a s e F o r " ) , k e y s = r e q u i r e ( " . / k e y s " ) ;
/ * *
* The base implementation of ` _.forOwn ` without support for iteratee shorthands .
*
* @ private
* @ param { Object } object The object to iterate over .
* @ param { Function } iteratee The function invoked per iteration .
* @ returns { Object } Returns ` object ` .
* / f u n c t i o n b a s e F o r O w n ( o b j e c t , i t e r a t e e ) { r e t u r n o b j e c t & & b a s e F o r ( o b j e c t , i t e r a t e e , k e y s ) } m o d u l e . e x p o r t s = b a s e F o r O w n } , { " . / _ b a s e F o r " : 8 7 , " . / k e y s " : 2 5 9 } ] , 8 9 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r c a s t P a t h = r e q u i r e ( " . / _ c a s t P a t h " ) , t o K e y = r e q u i r e ( " . / _ t o K e y " ) ;
/ * *
* The base implementation of ` _.get ` without support for default values .
*
* @ private
* @ param { Object } object The object to query .
* @ param { Array | string } path The path of the property to get .
* @ returns { * } Returns the resolved value .
* / f u n c t i o n b a s e G e t ( o b j e c t , p a t h ) { p a t h = c a s t P a t h ( p a t h , o b j e c t ) ; v a r i n d e x = 0 , l e n g t h = p a t h . l e n g t h ; w h i l e ( o b j e c t ! = n u l l & & i n d e x < l e n g t h ) { o b j e c t = o b j e c t [ t o K e y ( p a t h [ i n d e x + + ] ) ] } r e t u r n i n d e x & & i n d e x = = l e n g t h ? o b j e c t : u n d e f i n e d } m o d u l e . e x p o r t s = b a s e G e t } , { " . / _ c a s t P a t h " : 1 3 3 , " . / _ t o K e y " : 2 2 3 } ] , 9 0 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r a r r a y P u s h = r e q u i r e ( " . / _ a r r a y P u s h " ) , i s A r r a y = r e q u i r e ( " . / i s A r r a y " ) ;
/ * *
* The base implementation of ` getAllKeys ` and ` getAllKeysIn ` which uses
* ` keysFunc ` and ` symbolsFunc ` to get the enumerable property names and
* symbols of ` object ` .
*
* @ private
* @ param { Object } object The object to query .
* @ param { Function } keysFunc The function to get the keys of ` object ` .
* @ param { Function } symbolsFunc The function to get the symbols of ` object ` .
* @ returns { Array } Returns the array of property names and symbols .
* / f u n c t i o n b a s e G e t A l l K e y s ( o b j e c t , k e y s F u n c , s y m b o l s F u n c ) { v a r r e s u l t = k e y s F u n c ( o b j e c t ) ; r e t u r n i s A r r a y ( o b j e c t ) ? r e s u l t : a r r a y P u s h ( r e s u l t , s y m b o l s F u n c ( o b j e c t ) ) } m o d u l e . e x p o r t s = b a s e G e t A l l K e y s } , { " . / _ a r r a y P u s h " : 7 0 , " . / i s A r r a y " : 2 4 3 } ] , 9 1 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r S y m b o l = r e q u i r e ( " . / _ S y m b o l " ) , g e t R a w T a g = r e q u i r e ( " . / _ g e t R a w T a g " ) , o b j e c t T o S t r i n g = r e q u i r e ( " . / _ o b j e c t T o S t r i n g " ) ;
/** `Object#toString` result references. */ var nullTag = "[object Null]" , undefinedTag = "[object Undefined]" ;
/** Built-in value references. */ var symToStringTag = Symbol ? Symbol . toStringTag : undefined ;
/ * *
* The base implementation of ` getTag ` without fallbacks for buggy environments .
*
* @ private
* @ param { * } value The value to query .
* @ returns { string } Returns the ` toStringTag ` .
* / f u n c t i o n b a s e G e t T a g ( v a l u e ) { i f ( v a l u e = = n u l l ) { r e t u r n v a l u e = = = u n d e f i n e d ? u n d e f i n e d T a g : n u l l T a g } r e t u r n s y m T o S t r i n g T a g & & s y m T o S t r i n g T a g i n O b j e c t ( v a l u e ) ? g e t R a w T a g ( v a l u e ) : o b j e c t T o S t r i n g ( v a l u e ) } m o d u l e . e x p o r t s = b a s e G e t T a g } , { " . / _ S y m b o l " : 6 0 , " . / _ g e t R a w T a g " : 1 6 5 , " . / _ o b j e c t T o S t r i n g " : 2 0 5 } ] , 9 2 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) {
/ * *
* The base implementation of ` _.gt ` which doesn ' t coerce arguments .
*
* @ private
* @ param { * } value The value to compare .
* @ param { * } other The other value to compare .
* @ returns { boolean } Returns ` true ` if ` value ` is greater than ` other ` ,
* else ` false ` .
* /
function baseGt ( value , other ) { return value > other } module . exports = baseGt } , { } ] , 93 : [ function ( require , module , exports ) {
/** Used for built-in method references. */
var objectProto = Object . prototype ;
/** Used to check objects for own properties. */ var hasOwnProperty = objectProto . hasOwnProperty ;
/ * *
* The base implementation of ` _.has ` without support for deep paths .
*
* @ private
* @ param { Object } [ object ] The object to query .
* @ param { Array | string } key The key to check .
* @ returns { boolean } Returns ` true ` if ` key ` exists , else ` false ` .
* / f u n c t i o n b a s e H a s ( o b j e c t , k e y ) { r e t u r n o b j e c t ! = n u l l & & h a s O w n P r o p e r t y . c a l l ( o b j e c t , k e y ) } m o d u l e . e x p o r t s = b a s e H a s } , { } ] , 9 4 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) {
/ * *
* The base implementation of ` _.hasIn ` without support for deep paths .
*
* @ private
* @ param { Object } [ object ] The object to query .
* @ param { Array | string } key The key to check .
* @ returns { boolean } Returns ` true ` if ` key ` exists , else ` false ` .
* /
function baseHasIn ( object , key ) { return object != null && key in Object ( object ) } module . exports = baseHasIn } , { } ] , 95 : [ function ( require , module , exports ) { var baseFindIndex = require ( "./_baseFindIndex" ) , baseIsNaN = require ( "./_baseIsNaN" ) , strictIndexOf = require ( "./_strictIndexOf" ) ;
/ * *
* The base implementation of ` _.indexOf ` without ` fromIndex ` bounds checks .
*
* @ private
* @ param { Array } array The array to inspect .
* @ param { * } value The value to search for .
* @ param { number } fromIndex The index to search from .
* @ returns { number } Returns the index of the matched value , else ` -1 ` .
* / f u n c t i o n b a s e I n d e x O f ( a r r a y , v a l u e , f r o m I n d e x ) { r e t u r n v a l u e = = = v a l u e ? s t r i c t I n d e x O f ( a r r a y , v a l u e , f r o m I n d e x ) : b a s e F i n d I n d e x ( a r r a y , b a s e I s N a N , f r o m I n d e x ) } m o d u l e . e x p o r t s = b a s e I n d e x O f } , { " . / _ b a s e F i n d I n d e x " : 8 5 , " . / _ b a s e I s N a N " : 1 0 1 , " . / _ s t r i c t I n d e x O f " : 2 2 0 } ] , 9 6 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r b a s e G e t T a g = r e q u i r e ( " . / _ b a s e G e t T a g " ) , i s O b j e c t L i k e = r e q u i r e ( " . / i s O b j e c t L i k e " ) ;
/** `Object#toString` result references. */ var argsTag = "[object Arguments]" ;
/ * *
* The base implementation of ` _.isArguments ` .
*
* @ private
* @ param { * } value The value to check .
* @ returns { boolean } Returns ` true ` if ` value ` is an ` arguments ` object ,
* / f u n c t i o n b a s e I s A r g u m e n t s ( v a l u e ) { r e t u r n i s O b j e c t L i k e ( v a l u e ) & & b a s e G e t T a g ( v a l u e ) = = a r g s T a g } m o d u l e . e x p o r t s = b a s e I s A r g u m e n t s } , { " . / _ b a s e G e t T a g " : 9 1 , " . / i s O b j e c t L i k e " : 2 5 2 } ] , 9 7 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r b a s e I s E q u a l D e e p = r e q u i r e ( " . / _ b a s e I s E q u a l D e e p " ) , i s O b j e c t L i k e = r e q u i r e ( " . / i s O b j e c t L i k e " ) ;
/ * *
* The base implementation of ` _.isEqual ` which supports partial comparisons
* and tracks traversed objects .
*
* @ private
* @ param { * } value The value to compare .
* @ param { * } other The other value to compare .
* @ param { boolean } bitmask The bitmask flags .
* 1 - Unordered comparison
* 2 - Partial comparison
* @ param { Function } [ customizer ] The function to customize comparisons .
* @ param { Object } [ stack ] Tracks traversed ` value ` and ` other ` objects .
* @ returns { boolean } Returns ` true ` if the values are equivalent , else ` false ` .
* / f u n c t i o n b a s e I s E q u a l ( v a l u e , o t h e r , b i t m a s k , c u s t o m i z e r , s t a c k ) { i f ( v a l u e = = = o t h e r ) { r e t u r n t r u e } i f ( v a l u e = = n u l l | | o t h e r = = n u l l | | ! i s O b j e c t L i k e ( v a l u e ) & & ! i s O b j e c t L i k e ( o t h e r ) ) { r e t u r n v a l u e ! = = v a l u e & & o t h e r ! = = o t h e r } r e t u r n b a s e I s E q u a l D e e p ( v a l u e , o t h e r , b i t m a s k , c u s t o m i z e r , b a s e I s E q u a l , s t a c k ) } m o d u l e . e x p o r t s = b a s e I s E q u a l } , { " . / _ b a s e I s E q u a l D e e p " : 9 8 , " . / i s O b j e c t L i k e " : 2 5 2 } ] , 9 8 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r S t a c k = r e q u i r e ( " . / _ S t a c k " ) , e q u a l A r r a y s = r e q u i r e ( " . / _ e q u a l A r r a y s " ) , e q u a l B y T a g = r e q u i r e ( " . / _ e q u a l B y T a g " ) , e q u a l O b j e c t s = r e q u i r e ( " . / _ e q u a l O b j e c t s " ) , g e t T a g = r e q u i r e ( " . / _ g e t T a g " ) , i s A r r a y = r e q u i r e ( " . / i s A r r a y " ) , i s B u f f e r = r e q u i r e ( " . / i s B u f f e r " ) , i s T y p e d A r r a y = r e q u i r e ( " . / i s T y p e d A r r a y " ) ;
/** Used to compose bitmasks for value comparisons. */ var COMPARE _PARTIAL _FLAG = 1 ;
/** `Object#toString` result references. */ var argsTag = "[object Arguments]" , arrayTag = "[object Array]" , objectTag = "[object Object]" ;
/** Used for built-in method references. */ var objectProto = Object . prototype ;
/** Used to check objects for own properties. */ var hasOwnProperty = objectProto . hasOwnProperty ;
/ * *
* A specialized version of ` baseIsEqual ` for arrays and objects which performs
* deep comparisons and tracks traversed objects enabling objects with circular
* references to be compared .
*
* @ private
* @ param { Object } object The object to compare .
* @ param { Object } other The other object to compare .
* @ param { number } bitmask The bitmask flags . See ` baseIsEqual ` for more details .
* @ param { Function } customizer The function to customize comparisons .
* @ param { Function } equalFunc The function to determine equivalents of values .
* @ param { Object } [ stack ] Tracks traversed ` object ` and ` other ` objects .
* @ returns { boolean } Returns ` true ` if the objects are equivalent , else ` false ` .
* / f u n c t i o n b a s e I s E q u a l D e e p ( o b j e c t , o t h e r , b i t m a s k , c u s t o m i z e r , e q u a l F u n c , s t a c k ) { v a r o b j I s A r r = i s A r r a y ( o b j e c t ) , o t h I s A r r = i s A r r a y ( o t h e r ) , o b j T a g = o b j I s A r r ? a r r a y T a g : g e t T a g ( o b j e c t ) , o t h T a g = o t h I s A r r ? a r r a y T a g : g e t T a g ( o t h e r ) ; o b j T a g = o b j T a g = = a r g s T a g ? o b j e c t T a g : o b j T a g ; o t h T a g = o t h T a g = = a r g s T a g ? o b j e c t T a g : o t h T a g ; v a r o b j I s O b j = o b j T a g = = o b j e c t T a g , o t h I s O b j = o t h T a g = = o b j e c t T a g , i s S a m e T a g = o b j T a g = = o t h T a g ; i f ( i s S a m e T a g & & i s B u f f e r ( o b j e c t ) ) { i f ( ! i s B u f f e r ( o t h e r ) ) { r e t u r n f a l s e } o b j I s A r r = t r u e ; o b j I s O b j = f a l s e } i f ( i s S a m e T a g & & ! o b j I s O b j ) { s t a c k | | ( s t a c k = n e w S t a c k ) ; r e t u r n o b j I s A r r | | i s T y p e d A r r a y ( o b j e c t ) ? e q u a l A r r a y s ( o b j e c t , o t h e r , b i t m a s k , c u s t o m i z e r , e q u a l F u n c , s t a c k ) : e q u a l B y T a g ( o b j e c t , o t h e r , o b j T a g , b i t m a s k , c u s t o m i z e r , e q u a l F u n c , s t a c k ) } i f ( ! ( b i t m a s k & C O M P A R E _ P A R T I A L _ F L A G ) ) { v a r o b j I s W r a p p e d = o b j I s O b j & & h a s O w n P r o p e r t y . c a l l ( o b j e c t , " _ _ w r a p p e d _ _ " ) , o t h I s W r a p p e d = o t h I s O b j & & h a s O w n P r o p e r t y . c a l l ( o t h e r , " _ _ w r a p p e d _ _ " ) ; i f ( o b j I s W r a p p e d | | o t h I s W r a p p e d ) { v a r o b j U n w r a p p e d = o b j I s W r a p p e d ? o b j e c t . v a l u e ( ) : o b j e c t , o t h U n w r a p p e d = o t h I s W r a p p e d ? o t h e r . v a l u e ( ) : o t h e r ; s t a c k | | ( s t a c k = n e w S t a c k ) ; r e t u r n e q u a l F u n c ( o b j U n w r a p p e d , o t h U n w r a p p e d , b i t m a s k , c u s t o m i z e r , s t a c k ) } } i f ( ! i s S a m e T a g ) { r e t u r n f a l s e } s t a c k | | ( s t a c k = n e w S t a c k ) ; r e t u r n e q u a l O b j e c t s ( o b j e c t , o t h e r , b i t m a s k , c u s t o m i z e r , e q u a l F u n c , s t a c k ) } m o d u l e . e x p o r t s = b a s e I s E q u a l D e e p } , { " . / _ S t a c k " : 5 9 , " . / _ e q u a l A r r a y s " : 1 5 4 , " . / _ e q u a l B y T a g " : 1 5 5 , " . / _ e q u a l O b j e c t s " : 1 5 6 , " . / _ g e t T a g " : 1 6 8 , " . / i s A r r a y " : 2 4 3 , " . / i s B u f f e r " : 2 4 6 , " . / i s T y p e d A r r a y " : 2 5 7 } ] , 9 9 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r g e t T a g = r e q u i r e ( " . / _ g e t T a g " ) , i s O b j e c t L i k e = r e q u i r e ( " . / i s O b j e c t L i k e " ) ;
/** `Object#toString` result references. */ var mapTag = "[object Map]" ;
/ * *
* The base implementation of ` _.isMap ` without Node . js optimizations .
*
* @ private
* @ param { * } value The value to check .
* @ returns { boolean } Returns ` true ` if ` value ` is a map , else ` false ` .
* / f u n c t i o n b a s e I s M a p ( v a l u e ) { r e t u r n i s O b j e c t L i k e ( v a l u e ) & & g e t T a g ( v a l u e ) = = m a p T a g } m o d u l e . e x p o r t s = b a s e I s M a p } , { " . / _ g e t T a g " : 1 6 8 , " . / i s O b j e c t L i k e " : 2 5 2 } ] , 1 0 0 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r S t a c k = r e q u i r e ( " . / _ S t a c k " ) , b a s e I s E q u a l = r e q u i r e ( " . / _ b a s e I s E q u a l " ) ;
/** Used to compose bitmasks for value comparisons. */ var COMPARE _PARTIAL _FLAG = 1 , COMPARE _UNORDERED _FLAG = 2 ;
/ * *
* The base implementation of ` _.isMatch ` without support for iteratee shorthands .
*
* @ private
* @ param { Object } object The object to inspect .
* @ param { Object } source The object of property values to match .
* @ param { Array } matchData The property names , values , and compare flags to match .
* @ param { Function } [ customizer ] The function to customize comparisons .
* @ returns { boolean } Returns ` true ` if ` object ` is a match , else ` false ` .
* / f u n c t i o n b a s e I s M a t c h ( o b j e c t , s o u r c e , m a t c h D a t a , c u s t o m i z e r ) { v a r i n d e x = m a t c h D a t a . l e n g t h , l e n g t h = i n d e x , n o C u s t o m i z e r = ! c u s t o m i z e r ; i f ( o b j e c t = = n u l l ) { r e t u r n ! l e n g t h } o b j e c t = O b j e c t ( o b j e c t ) ; w h i l e ( i n d e x - - ) { v a r d a t a = m a t c h D a t a [ i n d e x ] ; i f ( n o C u s t o m i z e r & & d a t a [ 2 ] ? d a t a [ 1 ] ! = = o b j e c t [ d a t a [ 0 ] ] : ! ( d a t a [ 0 ] i n o b j e c t ) ) { r e t u r n f a l s e } } w h i l e ( + + i n d e x < l e n g t h ) { d a t a = m a t c h D a t a [ i n d e x ] ; v a r k e y = d a t a [ 0 ] , o b j V a l u e = o b j e c t [ k e y ] , s r c V a l u e = d a t a [ 1 ] ; i f ( n o C u s t o m i z e r & & d a t a [ 2 ] ) { i f ( o b j V a l u e = = = u n d e f i n e d & & ! ( k e y i n o b j e c t ) ) { r e t u r n f a l s e } } e l s e { v a r s t a c k = n e w S t a c k ; i f ( c u s t o m i z e r ) { v a r r e s u l t = c u s t o m i z e r ( o b j V a l u e , s r c V a l u e , k e y , o b j e c t , s o u r c e , s t a c k ) } i f ( ! ( r e s u l t = = = u n d e f i n e d ? b a s e I s E q u a l ( s r c V a l u e , o b j V a l u e , C O M P A R E _ P A R T I A L _ F L A G | C O M P A R E _ U N O R D E R E D _ F L A G , c u s t o m i z e r , s t a c k ) : r e s u l t ) ) { r e t u r n f a l s e } } } r e t u r n t r u e } m o d u l e . e x p o r t s = b a s e I s M a t c h } , { " . / _ S t a c k " : 5 9 , " . / _ b a s e I s E q u a l " : 9 7 } ] , 1 0 1 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) {
/ * *
* The base implementation of ` _.isNaN ` without support for number objects .
*
* @ private
* @ param { * } value The value to check .
* @ returns { boolean } Returns ` true ` if ` value ` is ` NaN ` , else ` false ` .
* /
function baseIsNaN ( value ) { return value !== value } module . exports = baseIsNaN } , { } ] , 102 : [ function ( require , module , exports ) { var isFunction = require ( "./isFunction" ) , isMasked = require ( "./_isMasked" ) , isObject = require ( "./isObject" ) , toSource = require ( "./_toSource" ) ;
/ * *
* Used to match ` RegExp `
2022-12-26 16:47:39 +00:00
* [ syntax characters ] ( https : //262.ecma-international.org/7.0/#sec-patterns).
2022-12-03 18:54:54 +00:00
* /var reRegExpChar=/ [ \ \ ^ $ . * + ? ( ) [ \ ] { } | ] / g ;
/** Used to detect host constructors (Safari). */ var reIsHostCtor = /^\[object .+?Constructor\]$/ ;
/** Used for built-in method references. */ var funcProto = Function . prototype , objectProto = Object . prototype ;
/** Used to resolve the decompiled source of functions. */ var funcToString = funcProto . toString ;
/** Used to check objects for own properties. */ var hasOwnProperty = objectProto . hasOwnProperty ;
/** Used to detect if a method is native. */ var reIsNative = RegExp ( "^" + funcToString . call ( hasOwnProperty ) . replace ( reRegExpChar , "\\$&" ) . replace ( /hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g , "$1.*?" ) + "$" ) ;
/ * *
* The base implementation of ` _.isNative ` without bad shim checks .
*
* @ private
* @ param { * } value The value to check .
* @ returns { boolean } Returns ` true ` if ` value ` is a native function ,
* else ` false ` .
* / f u n c t i o n b a s e I s N a t i v e ( v a l u e ) { i f ( ! i s O b j e c t ( v a l u e ) | | i s M a s k e d ( v a l u e ) ) { r e t u r n f a l s e } v a r p a t t e r n = i s F u n c t i o n ( v a l u e ) ? r e I s N a t i v e : r e I s H o s t C t o r ; r e t u r n p a t t e r n . t e s t ( t o S o u r c e ( v a l u e ) ) } m o d u l e . e x p o r t s = b a s e I s N a t i v e } , { " . / _ i s M a s k e d " : 1 8 5 , " . / _ t o S o u r c e " : 2 2 4 , " . / i s F u n c t i o n " : 2 4 8 , " . / i s O b j e c t " : 2 5 1 } ] , 1 0 3 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r g e t T a g = r e q u i r e ( " . / _ g e t T a g " ) , i s O b j e c t L i k e = r e q u i r e ( " . / i s O b j e c t L i k e " ) ;
/** `Object#toString` result references. */ var setTag = "[object Set]" ;
/ * *
* The base implementation of ` _.isSet ` without Node . js optimizations .
*
* @ private
* @ param { * } value The value to check .
* @ returns { boolean } Returns ` true ` if ` value ` is a set , else ` false ` .
* / f u n c t i o n b a s e I s S e t ( v a l u e ) { r e t u r n i s O b j e c t L i k e ( v a l u e ) & & g e t T a g ( v a l u e ) = = s e t T a g } m o d u l e . e x p o r t s = b a s e I s S e t } , { " . / _ g e t T a g " : 1 6 8 , " . / i s O b j e c t L i k e " : 2 5 2 } ] , 1 0 4 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r b a s e G e t T a g = r e q u i r e ( " . / _ b a s e G e t T a g " ) , i s L e n g t h = r e q u i r e ( " . / i s L e n g t h " ) , i s O b j e c t L i k e = r e q u i r e ( " . / i s O b j e c t L i k e " ) ;
/** `Object#toString` result references. */ var argsTag = "[object Arguments]" , arrayTag = "[object Array]" , boolTag = "[object Boolean]" , dateTag = "[object Date]" , errorTag = "[object Error]" , funcTag = "[object Function]" , mapTag = "[object Map]" , numberTag = "[object Number]" , objectTag = "[object Object]" , regexpTag = "[object RegExp]" , setTag = "[object Set]" , stringTag = "[object String]" , weakMapTag = "[object WeakMap]" ; var arrayBufferTag = "[object ArrayBuffer]" , dataViewTag = "[object DataView]" , float32Tag = "[object Float32Array]" , float64Tag = "[object Float64Array]" , int8Tag = "[object Int8Array]" , int16Tag = "[object Int16Array]" , int32Tag = "[object Int32Array]" , uint8Tag = "[object Uint8Array]" , uint8ClampedTag = "[object Uint8ClampedArray]" , uint16Tag = "[object Uint16Array]" , uint32Tag = "[object Uint32Array]" ;
/** Used to identify `toStringTag` values of typed arrays. */ var typedArrayTags = { } ; typedArrayTags [ float32Tag ] = typedArrayTags [ float64Tag ] = typedArrayTags [ int8Tag ] = typedArrayTags [ int16Tag ] = typedArrayTags [ int32Tag ] = typedArrayTags [ uint8Tag ] = typedArrayTags [ uint8ClampedTag ] = typedArrayTags [ uint16Tag ] = typedArrayTags [ uint32Tag ] = true ; typedArrayTags [ argsTag ] = typedArrayTags [ arrayTag ] = typedArrayTags [ arrayBufferTag ] = typedArrayTags [ boolTag ] = typedArrayTags [ dataViewTag ] = typedArrayTags [ dateTag ] = typedArrayTags [ errorTag ] = typedArrayTags [ funcTag ] = typedArrayTags [ mapTag ] = typedArrayTags [ numberTag ] = typedArrayTags [ objectTag ] = typedArrayTags [ regexpTag ] = typedArrayTags [ setTag ] = typedArrayTags [ stringTag ] = typedArrayTags [ weakMapTag ] = false ;
/ * *
* The base implementation of ` _.isTypedArray ` without Node . js optimizations .
*
* @ private
* @ param { * } value The value to check .
* @ returns { boolean } Returns ` true ` if ` value ` is a typed array , else ` false ` .
* / f u n c t i o n b a s e I s T y p e d A r r a y ( v a l u e ) { r e t u r n i s O b j e c t L i k e ( v a l u e ) & & i s L e n g t h ( v a l u e . l e n g t h ) & & ! ! t y p e d A r r a y T a g s [ b a s e G e t T a g ( v a l u e ) ] } m o d u l e . e x p o r t s = b a s e I s T y p e d A r r a y } , { " . / _ b a s e G e t T a g " : 9 1 , " . / i s L e n g t h " : 2 4 9 , " . / i s O b j e c t L i k e " : 2 5 2 } ] , 1 0 5 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r b a s e M a t c h e s = r e q u i r e ( " . / _ b a s e M a t c h e s " ) , b a s e M a t c h e s P r o p e r t y = r e q u i r e ( " . / _ b a s e M a t c h e s P r o p e r t y " ) , i d e n t i t y = r e q u i r e ( " . / i d e n t i t y " ) , i s A r r a y = r e q u i r e ( " . / i s A r r a y " ) , p r o p e r t y = r e q u i r e ( " . / p r o p e r t y " ) ;
/ * *
* The base implementation of ` _.iteratee ` .
*
* @ private
* @ param { * } [ value = _ . identity ] The value to convert to an iteratee .
* @ returns { Function } Returns the iteratee .
* / f u n c t i o n b a s e I t e r a t e e ( v a l u e ) {
// Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
// See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
if ( typeof value == "function" ) { return value } if ( value == null ) { return identity } if ( typeof value == "object" ) { return isArray ( value ) ? baseMatchesProperty ( value [ 0 ] , value [ 1 ] ) : baseMatches ( value ) } return property ( value ) } module . exports = baseIteratee } , { "./_baseMatches" : 110 , "./_baseMatchesProperty" : 111 , "./identity" : 241 , "./isArray" : 243 , "./property" : 272 } ] , 106 : [ function ( require , module , exports ) { var isPrototype = require ( "./_isPrototype" ) , nativeKeys = require ( "./_nativeKeys" ) ;
/** Used for built-in method references. */ var objectProto = Object . prototype ;
/** Used to check objects for own properties. */ var hasOwnProperty = objectProto . hasOwnProperty ;
/ * *
* The base implementation of ` _.keys ` which doesn ' t treat sparse arrays as dense .
*
* @ private
* @ param { Object } object The object to query .
* @ returns { Array } Returns the array of property names .
* / f u n c t i o n b a s e K e y s ( o b j e c t ) { i f ( ! i s P r o t o t y p e ( o b j e c t ) ) { r e t u r n n a t i v e K e y s ( o b j e c t ) } v a r r e s u l t = [ ] ; f o r ( v a r k e y i n O b j e c t ( o b j e c t ) ) { i f ( h a s O w n P r o p e r t y . c a l l ( o b j e c t , k e y ) & & k e y ! = " c o n s t r u c t o r " ) { r e s u l t . p u s h ( k e y ) } } r e t u r n r e s u l t } m o d u l e . e x p o r t s = b a s e K e y s } , { " . / _ i s P r o t o t y p e " : 1 8 6 , " . / _ n a t i v e K e y s " : 2 0 2 } ] , 1 0 7 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r i s O b j e c t = r e q u i r e ( " . / i s O b j e c t " ) , i s P r o t o t y p e = r e q u i r e ( " . / _ i s P r o t o t y p e " ) , n a t i v e K e y s I n = r e q u i r e ( " . / _ n a t i v e K e y s I n " ) ;
/** Used for built-in method references. */ var objectProto = Object . prototype ;
/** Used to check objects for own properties. */ var hasOwnProperty = objectProto . hasOwnProperty ;
/ * *
* The base implementation of ` _.keysIn ` which doesn ' t treat sparse arrays as dense .
*
* @ private
* @ param { Object } object The object to query .
* @ returns { Array } Returns the array of property names .
* / f u n c t i o n b a s e K e y s I n ( o b j e c t ) { i f ( ! i s O b j e c t ( o b j e c t ) ) { r e t u r n n a t i v e K e y s I n ( o b j e c t ) } v a r i s P r o t o = i s P r o t o t y p e ( o b j e c t ) , r e s u l t = [ ] ; f o r ( v a r k e y i n o b j e c t ) { i f ( ! ( k e y = = " c o n s t r u c t o r " & & ( i s P r o t o | | ! h a s O w n P r o p e r t y . c a l l ( o b j e c t , k e y ) ) ) ) { r e s u l t . p u s h ( k e y ) } } r e t u r n r e s u l t } m o d u l e . e x p o r t s = b a s e K e y s I n } , { " . / _ i s P r o t o t y p e " : 1 8 6 , " . / _ n a t i v e K e y s I n " : 2 0 3 , " . / i s O b j e c t " : 2 5 1 } ] , 1 0 8 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) {
/ * *
* The base implementation of ` _.lt ` which doesn ' t coerce arguments .
*
* @ private
* @ param { * } value The value to compare .
* @ param { * } other The other value to compare .
* @ returns { boolean } Returns ` true ` if ` value ` is less than ` other ` ,
* else ` false ` .
* /
function baseLt ( value , other ) { return value < other } module . exports = baseLt } , { } ] , 109 : [ function ( require , module , exports ) { var baseEach = require ( "./_baseEach" ) , isArrayLike = require ( "./isArrayLike" ) ;
/ * *
* The base implementation of ` _.map ` without support for iteratee shorthands .
*
* @ private
* @ param { Array | Object } collection The collection to iterate over .
* @ param { Function } iteratee The function invoked per iteration .
* @ returns { Array } Returns the new mapped array .
* / f u n c t i o n b a s e M a p ( c o l l e c t i o n , i t e r a t e e ) { v a r i n d e x = - 1 , r e s u l t = i s A r r a y L i k e ( c o l l e c t i o n ) ? A r r a y ( c o l l e c t i o n . l e n g t h ) : [ ] ; b a s e E a c h ( c o l l e c t i o n , f u n c t i o n ( v a l u e , k e y , c o l l e c t i o n ) { r e s u l t [ + + i n d e x ] = i t e r a t e e ( v a l u e , k e y , c o l l e c t i o n ) } ) ; r e t u r n r e s u l t } m o d u l e . e x p o r t s = b a s e M a p } , { " . / _ b a s e E a c h " : 8 2 , " . / i s A r r a y L i k e " : 2 4 4 } ] , 1 1 0 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r b a s e I s M a t c h = r e q u i r e ( " . / _ b a s e I s M a t c h " ) , g e t M a t c h D a t a = r e q u i r e ( " . / _ g e t M a t c h D a t a " ) , m a t c h e s S t r i c t C o m p a r a b l e = r e q u i r e ( " . / _ m a t c h e s S t r i c t C o m p a r a b l e " ) ;
/ * *
* The base implementation of ` _.matches ` which doesn ' t clone ` source ` .
*
* @ private
* @ param { Object } source The object of property values to match .
* @ returns { Function } Returns the new spec function .
* / f u n c t i o n b a s e M a t c h e s ( s o u r c e ) { v a r m a t c h D a t a = g e t M a t c h D a t a ( s o u r c e ) ; i f ( m a t c h D a t a . l e n g t h = = 1 & & m a t c h D a t a [ 0 ] [ 2 ] ) { r e t u r n m a t c h e s S t r i c t C o m p a r a b l e ( m a t c h D a t a [ 0 ] [ 0 ] , m a t c h D a t a [ 0 ] [ 1 ] ) } r e t u r n f u n c t i o n ( o b j e c t ) { r e t u r n o b j e c t = = = s o u r c e | | b a s e I s M a t c h ( o b j e c t , s o u r c e , m a t c h D a t a ) } } m o d u l e . e x p o r t s = b a s e M a t c h e s } , { " . / _ b a s e I s M a t c h " : 1 0 0 , " . / _ g e t M a t c h D a t a " : 1 6 2 , " . / _ m a t c h e s S t r i c t C o m p a r a b l e " : 1 9 9 } ] , 1 1 1 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r b a s e I s E q u a l = r e q u i r e ( " . / _ b a s e I s E q u a l " ) , g e t = r e q u i r e ( " . / g e t " ) , h a s I n = r e q u i r e ( " . / h a s I n " ) , i s K e y = r e q u i r e ( " . / _ i s K e y " ) , i s S t r i c t C o m p a r a b l e = r e q u i r e ( " . / _ i s S t r i c t C o m p a r a b l e " ) , m a t c h e s S t r i c t C o m p a r a b l e = r e q u i r e ( " . / _ m a t c h e s S t r i c t C o m p a r a b l e " ) , t o K e y = r e q u i r e ( " . / _ t o K e y " ) ;
/** Used to compose bitmasks for value comparisons. */ var COMPARE _PARTIAL _FLAG = 1 , COMPARE _UNORDERED _FLAG = 2 ;
/ * *
* The base implementation of ` _.matchesProperty ` which doesn ' t clone ` srcValue ` .
*
* @ private
* @ param { string } path The path of the property to get .
* @ param { * } srcValue The value to match .
* @ returns { Function } Returns the new spec function .
* / f u n c t i o n b a s e M a t c h e s P r o p e r t y ( p a t h , s r c V a l u e ) { i f ( i s K e y ( p a t h ) & & i s S t r i c t C o m p a r a b l e ( s r c V a l u e ) ) { r e t u r n m a t c h e s S t r i c t C o m p a r a b l e ( t o K e y ( p a t h ) , s r c V a l u e ) } r e t u r n f u n c t i o n ( o b j e c t ) { v a r o b j V a l u e = g e t ( o b j e c t , p a t h ) ; r e t u r n o b j V a l u e = = = u n d e f i n e d & & o b j V a l u e = = = s r c V a l u e ? h a s I n ( o b j e c t , p a t h ) : b a s e I s E q u a l ( s r c V a l u e , o b j V a l u e , C O M P A R E _ P A R T I A L _ F L A G | C O M P A R E _ U N O R D E R E D _ F L A G ) } } m o d u l e . e x p o r t s = b a s e M a t c h e s P r o p e r t y } , { " . / _ b a s e I s E q u a l " : 9 7 , " . / _ i s K e y " : 1 8 3 , " . / _ i s S t r i c t C o m p a r a b l e " : 1 8 7 , " . / _ m a t c h e s S t r i c t C o m p a r a b l e " : 1 9 9 , " . / _ t o K e y " : 2 2 3 , " . / g e t " : 2 3 8 , " . / h a s I n " : 2 4 0 } ] , 1 1 2 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r S t a c k = r e q u i r e ( " . / _ S t a c k " ) , a s s i g n M e r g e V a l u e = r e q u i r e ( " . / _ a s s i g n M e r g e V a l u e " ) , b a s e F o r = r e q u i r e ( " . / _ b a s e F o r " ) , b a s e M e r g e D e e p = r e q u i r e ( " . / _ b a s e M e r g e D e e p " ) , i s O b j e c t = r e q u i r e ( " . / i s O b j e c t " ) , k e y s I n = r e q u i r e ( " . / k e y s I n " ) , s a f e G e t = r e q u i r e ( " . / _ s a f e G e t " ) ;
/ * *
* The base implementation of ` _.merge ` without support for multiple sources .
*
* @ private
* @ param { Object } object The destination object .
* @ param { Object } source The source object .
* @ param { number } srcIndex The index of ` source ` .
* @ param { Function } [ customizer ] The function to customize merged values .
* @ param { Object } [ stack ] Tracks traversed source values and their merged
* counterparts .
* / f u n c t i o n b a s e M e r g e ( o b j e c t , s o u r c e , s r c I n d e x , c u s t o m i z e r , s t a c k ) { i f ( o b j e c t = = = s o u r c e ) { r e t u r n } b a s e F o r ( s o u r c e , f u n c t i o n ( s r c V a l u e , k e y ) { s t a c k | | ( s t a c k = n e w S t a c k ) ; i f ( i s O b j e c t ( s r c V a l u e ) ) { b a s e M e r g e D e e p ( o b j e c t , s o u r c e , k e y , s r c I n d e x , b a s e M e r g e , c u s t o m i z e r , s t a c k ) } e l s e { v a r n e w V a l u e = c u s t o m i z e r ? c u s t o m i z e r ( s a f e G e t ( o b j e c t , k e y ) , s r c V a l u e , k e y + " " , o b j e c t , s o u r c e , s t a c k ) : u n d e f i n e d ; i f ( n e w V a l u e = = = u n d e f i n e d ) { n e w V a l u e = s r c V a l u e } a s s i g n M e r g e V a l u e ( o b j e c t , k e y , n e w V a l u e ) } } , k e y s I n ) } m o d u l e . e x p o r t s = b a s e M e r g e } , { " . / _ S t a c k " : 5 9 , " . / _ a s s i g n M e r g e V a l u e " : 7 4 , " . / _ b a s e F o r " : 8 7 , " . / _ b a s e M e r g e D e e p " : 1 1 3 , " . / _ s a f e G e t " : 2 0 9 , " . / i s O b j e c t " : 2 5 1 , " . / k e y s I n " : 2 6 0 } ] , 1 1 3 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r a s s i g n M e r g e V a l u e = r e q u i r e ( " . / _ a s s i g n M e r g e V a l u e " ) , c l o n e B u f f e r = r e q u i r e ( " . / _ c l o n e B u f f e r " ) , c l o n e T y p e d A r r a y = r e q u i r e ( " . / _ c l o n e T y p e d A r r a y " ) , c o p y A r r a y = r e q u i r e ( " . / _ c o p y A r r a y " ) , i n i t C l o n e O b j e c t = r e q u i r e ( " . / _ i n i t C l o n e O b j e c t " ) , i s A r g u m e n t s = r e q u i r e ( " . / i s A r g u m e n t s " ) , i s A r r a y = r e q u i r e ( " . / i s A r r a y " ) , i s A r r a y L i k e O b j e c t = r e q u i r e ( " . / i s A r r a y L i k e O b j e c t " ) , i s B u f f e r = r e q u i r e ( " . / i s B u f f e r " ) , i s F u n c t i o n = r e q u i r e ( " . / i s F u n c t i o n " ) , i s O b j e c t = r e q u i r e ( " . / i s O b j e c t " ) , i s P l a i n O b j e c t = r e q u i r e ( " . / i s P l a i n O b j e c t " ) , i s T y p e d A r r a y = r e q u i r e ( " . / i s T y p e d A r r a y " ) , s a f e G e t = r e q u i r e ( " . / _ s a f e G e t " ) , t o P l a i n O b j e c t = r e q u i r e ( " . / t o P l a i n O b j e c t " ) ;
/ * *
* A specialized version of ` baseMerge ` for arrays and objects which performs
* deep merges and tracks traversed objects enabling objects with circular
* references to be merged .
*
* @ private
* @ param { Object } object The destination object .
* @ param { Object } source The source object .
* @ param { string } key The key of the value to merge .
* @ param { number } srcIndex The index of ` source ` .
* @ param { Function } mergeFunc The function to merge values .
* @ param { Function } [ customizer ] The function to customize assigned values .
* @ param { Object } [ stack ] Tracks traversed source values and their merged
* counterparts .
* / f u n c t i o n b a s e M e r g e D e e p ( o b j e c t , s o u r c e , k e y , s r c I n d e x , m e r g e F u n c , c u s t o m i z e r , s t a c k ) { v a r o b j V a l u e = s a f e G e t ( o b j e c t , k e y ) , s r c V a l u e = s a f e G e t ( s o u r c e , k e y ) , s t a c k e d = s t a c k . g e t ( s r c V a l u e ) ; i f ( s t a c k e d ) { a s s i g n M e r g e V a l u e ( o b j e c t , k e y , s t a c k e d ) ; r e t u r n } v a r n e w V a l u e = c u s t o m i z e r ? c u s t o m i z e r ( o b j V a l u e , s r c V a l u e , k e y + " " , o b j e c t , s o u r c e , s t a c k ) : u n d e f i n e d ; v a r i s C o m m o n = n e w V a l u e = = = u n d e f i n e d ; i f ( i s C o m m o n ) { v a r i s A r r = i s A r r a y ( s r c V a l u e ) , i s B u f f = ! i s A r r & & i s B u f f e r ( s r c V a l u e ) , i s T y p e d = ! i s A r r & & ! i s B u f f & & i s T y p e d A r r a y ( s r c V a l u e ) ; n e w V a l u e = s r c V a l u e ; i f ( i s A r r | | i s B u f f | | i s T y p e d ) { i f ( i s A r r a y ( o b j V a l u e ) ) { n e w V a l u e = o b j V a l u e } e l s e i f ( i s A r r a y L i k e O b j e c t ( o b j V a l u e ) ) { n e w V a l u e = c o p y A r r a y ( o b j V a l u e ) } e l s e i f ( i s B u f f ) { i s C o m m o n = f a l s e ; n e w V a l u e = c l o n e B u f f e r ( s r c V a l u e , t r u e ) } e l s e i f ( i s T y p e d ) { i s C o m m o n = f a l s e ; n e w V a l u e = c l o n e T y p e d A r r a y ( s r c V a l u e , t r u e ) } e l s e { n e w V a l u e = [ ] } } e l s e i f ( i s P l a i n O b j e c t ( s r c V a l u e ) | | i s A r g u m e n t s ( s r c V a l u e ) ) { n e w V a l u e = o b j V a l u e ; i f ( i s A r g u m e n t s ( o b j V a l u e ) ) { n e w V a l u e = t o P l a i n O b j e c t ( o b j V a l u e ) } e l s e i f ( ! i s O b j e c t ( o b j V a l u e ) | | i s F u n c t i o n ( o b j V a l u e ) ) { n e w V a l u e = i n i t C l o n e O b j e c t ( s r c V a l u e ) } } e l s e { i s C o m m o n = f a l s e } } i f ( i s C o m m o n ) {
// Recursively merge objects and arrays (susceptible to call stack limits).
stack . set ( srcValue , newValue ) ; mergeFunc ( newValue , srcValue , srcIndex , customizer , stack ) ; stack [ "delete" ] ( srcValue ) } assignMergeValue ( object , key , newValue ) } module . exports = baseMergeDeep } , { "./_assignMergeValue" : 74 , "./_cloneBuffer" : 135 , "./_cloneTypedArray" : 139 , "./_copyArray" : 142 , "./_initCloneObject" : 179 , "./_safeGet" : 209 , "./isArguments" : 242 , "./isArray" : 243 , "./isArrayLikeObject" : 245 , "./isBuffer" : 246 , "./isFunction" : 248 , "./isObject" : 251 , "./isPlainObject" : 253 , "./isTypedArray" : 257 , "./toPlainObject" : 282 } ] , 114 : [ function ( require , module , exports ) { var arrayMap = require ( "./_arrayMap" ) , baseIteratee = require ( "./_baseIteratee" ) , baseMap = require ( "./_baseMap" ) , baseSortBy = require ( "./_baseSortBy" ) , baseUnary = require ( "./_baseUnary" ) , compareMultiple = require ( "./_compareMultiple" ) , identity = require ( "./identity" ) ;
/ * *
* The base implementation of ` _.orderBy ` without param guards .
*
* @ private
* @ param { Array | Object } collection The collection to iterate over .
* @ param { Function [ ] | Object [ ] | string [ ] } iteratees The iteratees to sort by .
* @ param { string [ ] } orders The sort orders of ` iteratees ` .
* @ returns { Array } Returns the new sorted array .
* / f u n c t i o n b a s e O r d e r B y ( c o l l e c t i o n , i t e r a t e e s , o r d e r s ) { v a r i n d e x = - 1 ; i t e r a t e e s = a r r a y M a p ( i t e r a t e e s . l e n g t h ? i t e r a t e e s : [ i d e n t i t y ] , b a s e U n a r y ( b a s e I t e r a t e e ) ) ; v a r r e s u l t = b a s e M a p ( c o l l e c t i o n , f u n c t i o n ( v a l u e , k e y , c o l l e c t i o n ) { v a r c r i t e r i a = a r r a y M a p ( i t e r a t e e s , f u n c t i o n ( i t e r a t e e ) { r e t u r n i t e r a t e e ( v a l u e ) } ) ; r e t u r n { c r i t e r i a : c r i t e r i a , i n d e x : + + i n d e x , v a l u e : v a l u e } } ) ; r e t u r n b a s e S o r t B y ( r e s u l t , f u n c t i o n ( o b j e c t , o t h e r ) { r e t u r n c o m p a r e M u l t i p l e ( o b j e c t , o t h e r , o r d e r s ) } ) } m o d u l e . e x p o r t s = b a s e O r d e r B y } , { " . / _ a r r a y M a p " : 6 9 , " . / _ b a s e I t e r a t e e " : 1 0 5 , " . / _ b a s e M a p " : 1 0 9 , " . / _ b a s e S o r t B y " : 1 2 4 , " . / _ b a s e U n a r y " : 1 2 7 , " . / _ c o m p a r e M u l t i p l e " : 1 4 1 , " . / i d e n t i t y " : 2 4 1 } ] , 1 1 5 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r b a s e P i c k B y = r e q u i r e ( " . / _ b a s e P i c k B y " ) , h a s I n = r e q u i r e ( " . / h a s I n " ) ;
/ * *
* The base implementation of ` _.pick ` without support for individual
* property identifiers .
*
* @ private
* @ param { Object } object The source object .
* @ param { string [ ] } paths The property paths to pick .
* @ returns { Object } Returns the new object .
* / f u n c t i o n b a s e P i c k ( o b j e c t , p a t h s ) { r e t u r n b a s e P i c k B y ( o b j e c t , p a t h s , f u n c t i o n ( v a l u e , p a t h ) { r e t u r n h a s I n ( o b j e c t , p a t h ) } ) } m o d u l e . e x p o r t s = b a s e P i c k } , { " . / _ b a s e P i c k B y " : 1 1 6 , " . / h a s I n " : 2 4 0 } ] , 1 1 6 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r b a s e G e t = r e q u i r e ( " . / _ b a s e G e t " ) , b a s e S e t = r e q u i r e ( " . / _ b a s e S e t " ) , c a s t P a t h = r e q u i r e ( " . / _ c a s t P a t h " ) ;
/ * *
* The base implementation of ` _.pickBy ` without support for iteratee shorthands .
*
* @ private
* @ param { Object } object The source object .
* @ param { string [ ] } paths The property paths to pick .
* @ param { Function } predicate The function invoked per property .
* @ returns { Object } Returns the new object .
* / f u n c t i o n b a s e P i c k B y ( o b j e c t , p a t h s , p r e d i c a t e ) { v a r i n d e x = - 1 , l e n g t h = p a t h s . l e n g t h , r e s u l t = { } ; w h i l e ( + + i n d e x < l e n g t h ) { v a r p a t h = p a t h s [ i n d e x ] , v a l u e = b a s e G e t ( o b j e c t , p a t h ) ; i f ( p r e d i c a t e ( v a l u e , p a t h ) ) { b a s e S e t ( r e s u l t , c a s t P a t h ( p a t h , o b j e c t ) , v a l u e ) } } r e t u r n r e s u l t } m o d u l e . e x p o r t s = b a s e P i c k B y } , { " . / _ b a s e G e t " : 8 9 , " . / _ b a s e S e t " : 1 2 2 , " . / _ c a s t P a t h " : 1 3 3 } ] , 1 1 7 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) {
/ * *
* The base implementation of ` _.property ` without support for deep paths .
*
* @ private
* @ param { string } key The key of the property to get .
* @ returns { Function } Returns the new accessor function .
* /
function baseProperty ( key ) { return function ( object ) { return object == null ? undefined : object [ key ] } } module . exports = baseProperty } , { } ] , 118 : [ function ( require , module , exports ) { var baseGet = require ( "./_baseGet" ) ;
/ * *
* A specialized version of ` baseProperty ` which supports deep paths .
*
* @ private
* @ param { Array | string } path The path of the property to get .
* @ returns { Function } Returns the new accessor function .
* / f u n c t i o n b a s e P r o p e r t y D e e p ( p a t h ) { r e t u r n f u n c t i o n ( o b j e c t ) { r e t u r n b a s e G e t ( o b j e c t , p a t h ) } } m o d u l e . e x p o r t s = b a s e P r o p e r t y D e e p } , { " . / _ b a s e G e t " : 8 9 } ] , 1 1 9 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) {
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeCeil = Math . ceil , nativeMax = Math . max ;
/ * *
* The base implementation of ` _.range ` and ` _.rangeRight ` which doesn ' t
* coerce arguments .
*
* @ private
* @ param { number } start The start of the range .
* @ param { number } end The end of the range .
* @ param { number } step The value to increment or decrement by .
* @ param { boolean } [ fromRight ] Specify iterating from right to left .
* @ returns { Array } Returns the range of numbers .
* /function baseRange(start,end,step,fromRight){var index=-1,length=nativeMax(nativeCeil((end-start)/ ( step || 1 ) ) , 0 ) , result = Array ( length ) ; while ( length -- ) { result [ fromRight ? length : ++ index ] = start ; start += step } return result } module . exports = baseRange } , { } ] , 120 : [ function ( require , module , exports ) {
/ * *
* The base implementation of ` _.reduce ` and ` _.reduceRight ` , without support
* for iteratee shorthands , which iterates over ` collection ` using ` eachFunc ` .
*
* @ private
* @ param { Array | Object } collection The collection to iterate over .
* @ param { Function } iteratee The function invoked per iteration .
* @ param { * } accumulator The initial value .
* @ param { boolean } initAccum Specify using the first or last element of
* ` collection ` as the initial value .
* @ param { Function } eachFunc The function to iterate over ` collection ` .
* @ returns { * } Returns the accumulated value .
* /
function baseReduce ( collection , iteratee , accumulator , initAccum , eachFunc ) { eachFunc ( collection , function ( value , index , collection ) { accumulator = initAccum ? ( initAccum = false , value ) : iteratee ( accumulator , value , index , collection ) } ) ; return accumulator } module . exports = baseReduce } , { } ] , 121 : [ function ( require , module , exports ) { var identity = require ( "./identity" ) , overRest = require ( "./_overRest" ) , setToString = require ( "./_setToString" ) ;
/ * *
* The base implementation of ` _.rest ` which doesn ' t validate or coerce arguments .
*
* @ private
* @ param { Function } func The function to apply a rest parameter to .
* @ param { number } [ start = func . length - 1 ] The start position of the rest parameter .
* @ returns { Function } Returns the new function .
* / f u n c t i o n b a s e R e s t ( f u n c , s t a r t ) { r e t u r n s e t T o S t r i n g ( o v e r R e s t ( f u n c , s t a r t , i d e n t i t y ) , f u n c + " " ) } m o d u l e . e x p o r t s = b a s e R e s t } , { " . / _ o v e r R e s t " : 2 0 7 , " . / _ s e t T o S t r i n g " : 2 1 3 , " . / i d e n t i t y " : 2 4 1 } ] , 1 2 2 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r a s s i g n V a l u e = r e q u i r e ( " . / _ a s s i g n V a l u e " ) , c a s t P a t h = r e q u i r e ( " . / _ c a s t P a t h " ) , i s I n d e x = r e q u i r e ( " . / _ i s I n d e x " ) , i s O b j e c t = r e q u i r e ( " . / i s O b j e c t " ) , t o K e y = r e q u i r e ( " . / _ t o K e y " ) ;
/ * *
* The base implementation of ` _.set ` .
*
* @ private
* @ param { Object } object The object to modify .
* @ param { Array | string } path The path of the property to set .
* @ param { * } value The value to set .
* @ param { Function } [ customizer ] The function to customize path creation .
* @ returns { Object } Returns ` object ` .
* / f u n c t i o n b a s e S e t ( o b j e c t , p a t h , v a l u e , c u s t o m i z e r ) { i f ( ! i s O b j e c t ( o b j e c t ) ) { r e t u r n o b j e c t } p a t h = c a s t P a t h ( p a t h , o b j e c t ) ; v a r i n d e x = - 1 , l e n g t h = p a t h . l e n g t h , l a s t I n d e x = l e n g t h - 1 , n e s t e d = o b j e c t ; w h i l e ( n e s t e d ! = n u l l & & + + i n d e x < l e n g t h ) { v a r k e y = t o K e y ( p a t h [ i n d e x ] ) , n e w V a l u e = v a l u e ; i f ( i n d e x ! = l a s t I n d e x ) { v a r o b j V a l u e = n e s t e d [ k e y ] ; n e w V a l u e = c u s t o m i z e r ? c u s t o m i z e r ( o b j V a l u e , k e y , n e s t e d ) : u n d e f i n e d ; i f ( n e w V a l u e = = = u n d e f i n e d ) { n e w V a l u e = i s O b j e c t ( o b j V a l u e ) ? o b j V a l u e : i s I n d e x ( p a t h [ i n d e x + 1 ] ) ? [ ] : { } } } a s s i g n V a l u e ( n e s t e d , k e y , n e w V a l u e ) ; n e s t e d = n e s t e d [ k e y ] } r e t u r n o b j e c t } m o d u l e . e x p o r t s = b a s e S e t } , { " . / _ a s s i g n V a l u e " : 7 5 , " . / _ c a s t P a t h " : 1 3 3 , " . / _ i s I n d e x " : 1 8 1 , " . / _ t o K e y " : 2 2 3 , " . / i s O b j e c t " : 2 5 1 } ] , 1 2 3 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r c o n s t a n t = r e q u i r e ( " . / c o n s t a n t " ) , d e f i n e P r o p e r t y = r e q u i r e ( " . / _ d e f i n e P r o p e r t y " ) , i d e n t i t y = r e q u i r e ( " . / i d e n t i t y " ) ;
/ * *
* The base implementation of ` setToString ` without support for hot loop shorting .
*
* @ private
* @ param { Function } func The function to modify .
* @ param { Function } string The ` toString ` result .
* @ returns { Function } Returns ` func ` .
* / v a r b a s e S e t T o S t r i n g = ! d e f i n e P r o p e r t y ? i d e n t i t y : f u n c t i o n ( f u n c , s t r i n g ) { r e t u r n d e f i n e P r o p e r t y ( f u n c , " t o S t r i n g " , { c o n f i g u r a b l e : t r u e , e n u m e r a b l e : f a l s e , v a l u e : c o n s t a n t ( s t r i n g ) , w r i t a b l e : t r u e } ) } ; m o d u l e . e x p o r t s = b a s e S e t T o S t r i n g } , { " . / _ d e f i n e P r o p e r t y " : 1 5 3 , " . / c o n s t a n t " : 2 2 8 , " . / i d e n t i t y " : 2 4 1 } ] , 1 2 4 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) {
/ * *
* The base implementation of ` _.sortBy ` which uses ` comparer ` to define the
* sort order of ` array ` and replaces criteria objects with their corresponding
* values .
*
* @ private
* @ param { Array } array The array to sort .
* @ param { Function } comparer The function to define sort order .
* @ returns { Array } Returns ` array ` .
* /
function baseSortBy ( array , comparer ) { var length = array . length ; array . sort ( comparer ) ; while ( length -- ) { array [ length ] = array [ length ] . value } return array } module . exports = baseSortBy } , { } ] , 125 : [ function ( require , module , exports ) {
/ * *
* The base implementation of ` _.times ` without support for iteratee shorthands
* or max array length checks .
*
* @ private
* @ param { number } n The number of times to invoke ` iteratee ` .
* @ param { Function } iteratee The function invoked per iteration .
* @ returns { Array } Returns the array of results .
* /
function baseTimes ( n , iteratee ) { var index = - 1 , result = Array ( n ) ; while ( ++ index < n ) { result [ index ] = iteratee ( index ) } return result } module . exports = baseTimes } , { } ] , 126 : [ function ( require , module , exports ) { var Symbol = require ( "./_Symbol" ) , arrayMap = require ( "./_arrayMap" ) , isArray = require ( "./isArray" ) , isSymbol = require ( "./isSymbol" ) ;
/** Used as references for various `Number` constants. */ var INFINITY = 1 / 0 ;
/** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol ? Symbol . prototype : undefined , symbolToString = symbolProto ? symbolProto . toString : undefined ;
/ * *
* The base implementation of ` _.toString ` which doesn ' t convert nullish
* values to empty strings .
*
* @ private
* @ param { * } value The value to process .
* @ returns { string } Returns the string .
* / f u n c t i o n b a s e T o S t r i n g ( v a l u e ) {
// Exit early for strings to avoid a performance hit in some environments.
if ( typeof value == "string" ) { return value } if ( isArray ( value ) ) {
// Recursively convert values (susceptible to call stack limits).
return arrayMap ( value , baseToString ) + "" } if ( isSymbol ( value ) ) { return symbolToString ? symbolToString . call ( value ) : "" } var result = value + "" ; return result == "0" && 1 / value == - INFINITY ? "-0" : result } module . exports = baseToString } , { "./_Symbol" : 60 , "./_arrayMap" : 69 , "./isArray" : 243 , "./isSymbol" : 256 } ] , 127 : [ function ( require , module , exports ) {
/ * *
* The base implementation of ` _.unary ` without support for storing metadata .
*
* @ private
* @ param { Function } func The function to cap arguments for .
* @ returns { Function } Returns the new capped function .
* /
function baseUnary ( func ) { return function ( value ) { return func ( value ) } } module . exports = baseUnary } , { } ] , 128 : [ function ( require , module , exports ) { var SetCache = require ( "./_SetCache" ) , arrayIncludes = require ( "./_arrayIncludes" ) , arrayIncludesWith = require ( "./_arrayIncludesWith" ) , cacheHas = require ( "./_cacheHas" ) , createSet = require ( "./_createSet" ) , setToArray = require ( "./_setToArray" ) ;
/** Used as the size to enable large array optimizations. */ var LARGE _ARRAY _SIZE = 200 ;
/ * *
* The base implementation of ` _.uniqBy ` without support for iteratee shorthands .
*
* @ private
* @ param { Array } array The array to inspect .
* @ param { Function } [ iteratee ] The iteratee invoked per element .
* @ param { Function } [ comparator ] The comparator invoked per element .
* @ returns { Array } Returns the new duplicate free array .
* / f u n c t i o n b a s e U n i q ( a r r a y , i t e r a t e e , c o m p a r a t o r ) { v a r i n d e x = - 1 , i n c l u d e s = a r r a y I n c l u d e s , l e n g t h = a r r a y . l e n g t h , i s C o m m o n = t r u e , r e s u l t = [ ] , s e e n = r e s u l t ; i f ( c o m p a r a t o r ) { i s C o m m o n = f a l s e ; i n c l u d e s = a r r a y I n c l u d e s W i t h } e l s e i f ( l e n g t h > = L A R G E _ A R R A Y _ S I Z E ) { v a r s e t = i t e r a t e e ? n u l l : c r e a t e S e t ( a r r a y ) ; i f ( s e t ) { r e t u r n s e t T o A r r a y ( s e t ) } i s C o m m o n = f a l s e ; i n c l u d e s = c a c h e H a s ; s e e n = n e w S e t C a c h e } e l s e { s e e n = i t e r a t e e ? [ ] : r e s u l t } o u t e r : w h i l e ( + + i n d e x < l e n g t h ) { v a r v a l u e = a r r a y [ i n d e x ] , c o m p u t e d = i t e r a t e e ? i t e r a t e e ( v a l u e ) : v a l u e ; v a l u e = c o m p a r a t o r | | v a l u e ! = = 0 ? v a l u e : 0 ; i f ( i s C o m m o n & & c o m p u t e d = = = c o m p u t e d ) { v a r s e e n I n d e x = s e e n . l e n g t h ; w h i l e ( s e e n I n d e x - - ) { i f ( s e e n [ s e e n I n d e x ] = = = c o m p u t e d ) { c o n t i n u e o u t e r } } i f ( i t e r a t e e ) { s e e n . p u s h ( c o m p u t e d ) } r e s u l t . p u s h ( v a l u e ) } e l s e i f ( ! i n c l u d e s ( s e e n , c o m p u t e d , c o m p a r a t o r ) ) { i f ( s e e n ! = = r e s u l t ) { s e e n . p u s h ( c o m p u t e d ) } r e s u l t . p u s h ( v a l u e ) } } r e t u r n r e s u l t } m o d u l e . e x p o r t s = b a s e U n i q } , { " . / _ S e t C a c h e " : 5 8 , " . / _ a r r a y I n c l u d e s " : 6 6 , " . / _ a r r a y I n c l u d e s W i t h " : 6 7 , " . / _ c a c h e H a s " : 1 3 1 , " . / _ c r e a t e S e t " : 1 5 2 , " . / _ s e t T o A r r a y " : 2 1 2 } ] , 1 2 9 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r a r r a y M a p = r e q u i r e ( " . / _ a r r a y M a p " ) ;
/ * *
* The base implementation of ` _.values ` and ` _.valuesIn ` which creates an
* array of ` object ` property values corresponding to the property names
* of ` props ` .
*
* @ private
* @ param { Object } object The object to query .
* @ param { Array } props The property names to get values for .
* @ returns { Object } Returns the array of property values .
* / f u n c t i o n b a s e V a l u e s ( o b j e c t , p r o p s ) { r e t u r n a r r a y M a p ( p r o p s , f u n c t i o n ( k e y ) { r e t u r n o b j e c t [ k e y ] } ) } m o d u l e . e x p o r t s = b a s e V a l u e s } , { " . / _ a r r a y M a p " : 6 9 } ] , 1 3 0 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) {
/ * *
* This base implementation of ` _.zipObject ` which assigns values using ` assignFunc ` .
*
* @ private
* @ param { Array } props The property identifiers .
* @ param { Array } values The property values .
* @ param { Function } assignFunc The function to assign values .
* @ returns { Object } Returns the new object .
* /
function baseZipObject ( props , values , assignFunc ) { var index = - 1 , length = props . length , valsLength = values . length , result = { } ; while ( ++ index < length ) { var value = index < valsLength ? values [ index ] : undefined ; assignFunc ( result , props [ index ] , value ) } return result } module . exports = baseZipObject } , { } ] , 131 : [ function ( require , module , exports ) {
/ * *
* Checks if a ` cache ` value for ` key ` exists .
*
* @ private
* @ param { Object } cache The cache to query .
* @ param { string } key The key of the entry to check .
* @ returns { boolean } Returns ` true ` if an entry for ` key ` exists , else ` false ` .
* /
function cacheHas ( cache , key ) { return cache . has ( key ) } module . exports = cacheHas } , { } ] , 132 : [ function ( require , module , exports ) { var identity = require ( "./identity" ) ;
/ * *
* Casts ` value ` to ` identity ` if it ' s not a function .
*
* @ private
* @ param { * } value The value to inspect .
* @ returns { Function } Returns cast function .
* / f u n c t i o n c a s t F u n c t i o n ( v a l u e ) { r e t u r n t y p e o f v a l u e = = " f u n c t i o n " ? v a l u e : i d e n t i t y } m o d u l e . e x p o r t s = c a s t F u n c t i o n } , { " . / i d e n t i t y " : 2 4 1 } ] , 1 3 3 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r i s A r r a y = r e q u i r e ( " . / i s A r r a y " ) , i s K e y = r e q u i r e ( " . / _ i s K e y " ) , s t r i n g T o P a t h = r e q u i r e ( " . / _ s t r i n g T o P a t h " ) , t o S t r i n g = r e q u i r e ( " . / t o S t r i n g " ) ;
/ * *
* Casts ` value ` to a path array if it ' s not one .
*
* @ private
* @ param { * } value The value to inspect .
* @ param { Object } [ object ] The object to query keys on .
* @ returns { Array } Returns the cast property path array .
* / f u n c t i o n c a s t P a t h ( v a l u e , o b j e c t ) { i f ( i s A r r a y ( v a l u e ) ) { r e t u r n v a l u e } r e t u r n i s K e y ( v a l u e , o b j e c t ) ? [ v a l u e ] : s t r i n g T o P a t h ( t o S t r i n g ( v a l u e ) ) } m o d u l e . e x p o r t s = c a s t P a t h } , { " . / _ i s K e y " : 1 8 3 , " . / _ s t r i n g T o P a t h " : 2 2 2 , " . / i s A r r a y " : 2 4 3 , " . / t o S t r i n g " : 2 8 3 } ] , 1 3 4 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r U i n t 8 A r r a y = r e q u i r e ( " . / _ U i n t 8 A r r a y " ) ;
/ * *
* Creates a clone of ` arrayBuffer ` .
*
* @ private
* @ param { ArrayBuffer } arrayBuffer The array buffer to clone .
* @ returns { ArrayBuffer } Returns the cloned array buffer .
* / f u n c t i o n c l o n e A r r a y B u f f e r ( a r r a y B u f f e r ) { v a r r e s u l t = n e w a r r a y B u f f e r . c o n s t r u c t o r ( a r r a y B u f f e r . b y t e L e n g t h ) ; n e w U i n t 8 A r r a y ( r e s u l t ) . s e t ( n e w U i n t 8 A r r a y ( a r r a y B u f f e r ) ) ; r e t u r n r e s u l t } m o d u l e . e x p o r t s = c l o n e A r r a y B u f f e r } , { " . / _ U i n t 8 A r r a y " : 6 1 } ] , 1 3 5 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r r o o t = r e q u i r e ( " . / _ r o o t " ) ;
/** Detect free variable `exports`. */ var freeExports = typeof exports == "object" && exports && ! exports . nodeType && exports ;
/** Detect free variable `module`. */ var freeModule = freeExports && typeof module == "object" && module && ! module . nodeType && module ;
/** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule . exports === freeExports ;
/** Built-in value references. */ var Buffer = moduleExports ? root . Buffer : undefined , allocUnsafe = Buffer ? Buffer . allocUnsafe : undefined ;
/ * *
* Creates a clone of ` buffer ` .
*
* @ private
* @ param { Buffer } buffer The buffer to clone .
* @ param { boolean } [ isDeep ] Specify a deep clone .
* @ returns { Buffer } Returns the cloned buffer .
* / f u n c t i o n c l o n e B u f f e r ( b u f f e r , i s D e e p ) { i f ( i s D e e p ) { r e t u r n b u f f e r . s l i c e ( ) } v a r l e n g t h = b u f f e r . l e n g t h , r e s u l t = a l l o c U n s a f e ? a l l o c U n s a f e ( l e n g t h ) : n e w b u f f e r . c o n s t r u c t o r ( l e n g t h ) ; b u f f e r . c o p y ( r e s u l t ) ; r e t u r n r e s u l t } m o d u l e . e x p o r t s = c l o n e B u f f e r } , { " . / _ r o o t " : 2 0 8 } ] , 1 3 6 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r c l o n e A r r a y B u f f e r = r e q u i r e ( " . / _ c l o n e A r r a y B u f f e r " ) ;
/ * *
* Creates a clone of ` dataView ` .
*
* @ private
* @ param { Object } dataView The data view to clone .
* @ param { boolean } [ isDeep ] Specify a deep clone .
* @ returns { Object } Returns the cloned data view .
* / f u n c t i o n c l o n e D a t a V i e w ( d a t a V i e w , i s D e e p ) { v a r b u f f e r = i s D e e p ? c l o n e A r r a y B u f f e r ( d a t a V i e w . b u f f e r ) : d a t a V i e w . b u f f e r ; r e t u r n n e w d a t a V i e w . c o n s t r u c t o r ( b u f f e r , d a t a V i e w . b y t e O f f s e t , d a t a V i e w . b y t e L e n g t h ) } m o d u l e . e x p o r t s = c l o n e D a t a V i e w } , { " . / _ c l o n e A r r a y B u f f e r " : 1 3 4 } ] , 1 3 7 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) {
/** Used to match `RegExp` flags from their coerced string values. */
var reFlags = /\w*$/ ;
/ * *
* Creates a clone of ` regexp ` .
*
* @ private
* @ param { Object } regexp The regexp to clone .
* @ returns { Object } Returns the cloned regexp .
* / f u n c t i o n c l o n e R e g E x p ( r e g e x p ) { v a r r e s u l t = n e w r e g e x p . c o n s t r u c t o r ( r e g e x p . s o u r c e , r e F l a g s . e x e c ( r e g e x p ) ) ; r e s u l t . l a s t I n d e x = r e g e x p . l a s t I n d e x ; r e t u r n r e s u l t } m o d u l e . e x p o r t s = c l o n e R e g E x p } , { } ] , 1 3 8 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r S y m b o l = r e q u i r e ( " . / _ S y m b o l " ) ;
/** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol ? Symbol . prototype : undefined , symbolValueOf = symbolProto ? symbolProto . valueOf : undefined ;
/ * *
* Creates a clone of the ` symbol ` object .
*
* @ private
* @ param { Object } symbol The symbol object to clone .
* @ returns { Object } Returns the cloned symbol object .
* / f u n c t i o n c l o n e S y m b o l ( s y m b o l ) { r e t u r n s y m b o l V a l u e O f ? O b j e c t ( s y m b o l V a l u e O f . c a l l ( s y m b o l ) ) : { } } m o d u l e . e x p o r t s = c l o n e S y m b o l } , { " . / _ S y m b o l " : 6 0 } ] , 1 3 9 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r c l o n e A r r a y B u f f e r = r e q u i r e ( " . / _ c l o n e A r r a y B u f f e r " ) ;
/ * *
* Creates a clone of ` typedArray ` .
*
* @ private
* @ param { Object } typedArray The typed array to clone .
* @ param { boolean } [ isDeep ] Specify a deep clone .
* @ returns { Object } Returns the cloned typed array .
* / f u n c t i o n c l o n e T y p e d A r r a y ( t y p e d A r r a y , i s D e e p ) { v a r b u f f e r = i s D e e p ? c l o n e A r r a y B u f f e r ( t y p e d A r r a y . b u f f e r ) : t y p e d A r r a y . b u f f e r ; r e t u r n n e w t y p e d A r r a y . c o n s t r u c t o r ( b u f f e r , t y p e d A r r a y . b y t e O f f s e t , t y p e d A r r a y . l e n g t h ) } m o d u l e . e x p o r t s = c l o n e T y p e d A r r a y } , { " . / _ c l o n e A r r a y B u f f e r " : 1 3 4 } ] , 1 4 0 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r i s S y m b o l = r e q u i r e ( " . / i s S y m b o l " ) ;
/ * *
* Compares values to sort them in ascending order .
*
* @ private
* @ param { * } value The value to compare .
* @ param { * } other The other value to compare .
* @ returns { number } Returns the sort order indicator for ` value ` .
* / f u n c t i o n c o m p a r e A s c e n d i n g ( v a l u e , o t h e r ) { i f ( v a l u e ! = = o t h e r ) { v a r v a l I s D e f i n e d = v a l u e ! = = u n d e f i n e d , v a l I s N u l l = v a l u e = = = n u l l , v a l I s R e f l e x i v e = v a l u e = = = v a l u e , v a l I s S y m b o l = i s S y m b o l ( v a l u e ) ; v a r o t h I s D e f i n e d = o t h e r ! = = u n d e f i n e d , o t h I s N u l l = o t h e r = = = n u l l , o t h I s R e f l e x i v e = o t h e r = = = o t h e r , o t h I s S y m b o l = i s S y m b o l ( o t h e r ) ; i f ( ! o t h I s N u l l & & ! o t h I s S y m b o l & & ! v a l I s S y m b o l & & v a l u e > o t h e r | | v a l I s S y m b o l & & o t h I s D e f i n e d & & o t h I s R e f l e x i v e & & ! o t h I s N u l l & & ! o t h I s S y m b o l | | v a l I s N u l l & & o t h I s D e f i n e d & & o t h I s R e f l e x i v e | | ! v a l I s D e f i n e d & & o t h I s R e f l e x i v e | | ! v a l I s R e f l e x i v e ) { r e t u r n 1 } i f ( ! v a l I s N u l l & & ! v a l I s S y m b o l & & ! o t h I s S y m b o l & & v a l u e < o t h e r | | o t h I s S y m b o l & & v a l I s D e f i n e d & & v a l I s R e f l e x i v e & & ! v a l I s N u l l & & ! v a l I s S y m b o l | | o t h I s N u l l & & v a l I s D e f i n e d & & v a l I s R e f l e x i v e | | ! o t h I s D e f i n e d & & v a l I s R e f l e x i v e | | ! o t h I s R e f l e x i v e ) { r e t u r n - 1 } } r e t u r n 0 } m o d u l e . e x p o r t s = c o m p a r e A s c e n d i n g } , { " . / i s S y m b o l " : 2 5 6 } ] , 1 4 1 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r c o m p a r e A s c e n d i n g = r e q u i r e ( " . / _ c o m p a r e A s c e n d i n g " ) ;
/ * *
* Used by ` _.orderBy ` to compare multiple properties of a value to another
* and stable sort them .
*
* If ` orders ` is unspecified , all values are sorted in ascending order . Otherwise ,
* specify an order of "desc" for descending or "asc" for ascending sort order
* of corresponding values .
*
* @ private
* @ param { Object } object The object to compare .
* @ param { Object } other The other object to compare .
* @ param { boolean [ ] | string [ ] } orders The order to sort by for each property .
* @ returns { number } Returns the sort order indicator for ` object ` .
* / f u n c t i o n c o m p a r e M u l t i p l e ( o b j e c t , o t h e r , o r d e r s ) { v a r i n d e x = - 1 , o b j C r i t e r i a = o b j e c t . c r i t e r i a , o t h C r i t e r i a = o t h e r . c r i t e r i a , l e n g t h = o b j C r i t e r i a . l e n g t h , o r d e r s L e n g t h = o r d e r s . l e n g t h ; w h i l e ( + + i n d e x < l e n g t h ) { v a r r e s u l t = c o m p a r e A s c e n d i n g ( o b j C r i t e r i a [ i n d e x ] , o t h C r i t e r i a [ i n d e x ] ) ; i f ( r e s u l t ) { i f ( i n d e x > = o r d e r s L e n g t h ) { r e t u r n r e s u l t } v a r o r d e r = o r d e r s [ i n d e x ] ; r e t u r n r e s u l t * ( o r d e r = = " d e s c " ? - 1 : 1 ) } }
// Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
// that causes it, under certain circumstances, to provide the same value for
// `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
// for more details.
//
// This also ensures a stable sort in V8 and other engines.
// See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
return object . index - other . index } module . exports = compareMultiple } , { "./_compareAscending" : 140 } ] , 142 : [ function ( require , module , exports ) {
/ * *
* Copies the values of ` source ` to ` array ` .
*
* @ private
* @ param { Array } source The array to copy values from .
* @ param { Array } [ array = [ ] ] The array to copy values to .
* @ returns { Array } Returns ` array ` .
* /
function copyArray ( source , array ) { var index = - 1 , length = source . length ; array || ( array = Array ( length ) ) ; while ( ++ index < length ) { array [ index ] = source [ index ] } return array } module . exports = copyArray } , { } ] , 143 : [ function ( require , module , exports ) { var assignValue = require ( "./_assignValue" ) , baseAssignValue = require ( "./_baseAssignValue" ) ;
/ * *
* Copies properties of ` source ` to ` object ` .
*
* @ private
* @ param { Object } source The object to copy properties from .
* @ param { Array } props The property identifiers to copy .
* @ param { Object } [ object = { } ] The object to copy properties to .
* @ param { Function } [ customizer ] The function to customize copied values .
* @ returns { Object } Returns ` object ` .
* / f u n c t i o n c o p y O b j e c t ( s o u r c e , p r o p s , o b j e c t , c u s t o m i z e r ) { v a r i s N e w = ! o b j e c t ; o b j e c t | | ( o b j e c t = { } ) ; v a r i n d e x = - 1 , l e n g t h = p r o p s . l e n g t h ; w h i l e ( + + i n d e x < l e n g t h ) { v a r k e y = p r o p s [ i n d e x ] ; v a r n e w V a l u e = c u s t o m i z e r ? c u s t o m i z e r ( o b j e c t [ k e y ] , s o u r c e [ k e y ] , k e y , o b j e c t , s o u r c e ) : u n d e f i n e d ; i f ( n e w V a l u e = = = u n d e f i n e d ) { n e w V a l u e = s o u r c e [ k e y ] } i f ( i s N e w ) { b a s e A s s i g n V a l u e ( o b j e c t , k e y , n e w V a l u e ) } e l s e { a s s i g n V a l u e ( o b j e c t , k e y , n e w V a l u e ) } } r e t u r n o b j e c t } m o d u l e . e x p o r t s = c o p y O b j e c t } , { " . / _ a s s i g n V a l u e " : 7 5 , " . / _ b a s e A s s i g n V a l u e " : 7 9 } ] , 1 4 4 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r c o p y O b j e c t = r e q u i r e ( " . / _ c o p y O b j e c t " ) , g e t S y m b o l s = r e q u i r e ( " . / _ g e t S y m b o l s " ) ;
/ * *
* Copies own symbols of ` source ` to ` object ` .
*
* @ private
* @ param { Object } source The object to copy symbols from .
* @ param { Object } [ object = { } ] The object to copy symbols to .
* @ returns { Object } Returns ` object ` .
* / f u n c t i o n c o p y S y m b o l s ( s o u r c e , o b j e c t ) { r e t u r n c o p y O b j e c t ( s o u r c e , g e t S y m b o l s ( s o u r c e ) , o b j e c t ) } m o d u l e . e x p o r t s = c o p y S y m b o l s } , { " . / _ c o p y O b j e c t " : 1 4 3 , " . / _ g e t S y m b o l s " : 1 6 6 } ] , 1 4 5 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r c o p y O b j e c t = r e q u i r e ( " . / _ c o p y O b j e c t " ) , g e t S y m b o l s I n = r e q u i r e ( " . / _ g e t S y m b o l s I n " ) ;
/ * *
* Copies own and inherited symbols of ` source ` to ` object ` .
*
* @ private
* @ param { Object } source The object to copy symbols from .
* @ param { Object } [ object = { } ] The object to copy symbols to .
* @ returns { Object } Returns ` object ` .
* / f u n c t i o n c o p y S y m b o l s I n ( s o u r c e , o b j e c t ) { r e t u r n c o p y O b j e c t ( s o u r c e , g e t S y m b o l s I n ( s o u r c e ) , o b j e c t ) } m o d u l e . e x p o r t s = c o p y S y m b o l s I n } , { " . / _ c o p y O b j e c t " : 1 4 3 , " . / _ g e t S y m b o l s I n " : 1 6 7 } ] , 1 4 6 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r r o o t = r e q u i r e ( " . / _ r o o t " ) ;
/** Used to detect overreaching core-js shims. */ var coreJsData = root [ "__core-js_shared__" ] ; module . exports = coreJsData } , { "./_root" : 208 } ] , 147 : [ function ( require , module , exports ) { var baseRest = require ( "./_baseRest" ) , isIterateeCall = require ( "./_isIterateeCall" ) ;
/ * *
* Creates a function like ` _.assign ` .
*
* @ private
* @ param { Function } assigner The function to assign values .
* @ returns { Function } Returns the new assigner function .
* / f u n c t i o n c r e a t e A s s i g n e r ( a s s i g n e r ) { r e t u r n b a s e R e s t ( f u n c t i o n ( o b j e c t , s o u r c e s ) { v a r i n d e x = - 1 , l e n g t h = s o u r c e s . l e n g t h , c u s t o m i z e r = l e n g t h > 1 ? s o u r c e s [ l e n g t h - 1 ] : u n d e f i n e d , g u a r d = l e n g t h > 2 ? s o u r c e s [ 2 ] : u n d e f i n e d ; c u s t o m i z e r = a s s i g n e r . l e n g t h > 3 & & t y p e o f c u s t o m i z e r = = " f u n c t i o n " ? ( l e n g t h - - , c u s t o m i z e r ) : u n d e f i n e d ; i f ( g u a r d & & i s I t e r a t e e C a l l ( s o u r c e s [ 0 ] , s o u r c e s [ 1 ] , g u a r d ) ) { c u s t o m i z e r = l e n g t h < 3 ? u n d e f i n e d : c u s t o m i z e r ; l e n g t h = 1 } o b j e c t = O b j e c t ( o b j e c t ) ; w h i l e ( + + i n d e x < l e n g t h ) { v a r s o u r c e = s o u r c e s [ i n d e x ] ; i f ( s o u r c e ) { a s s i g n e r ( o b j e c t , s o u r c e , i n d e x , c u s t o m i z e r ) } } r e t u r n o b j e c t } ) } m o d u l e . e x p o r t s = c r e a t e A s s i g n e r } , { " . / _ b a s e R e s t " : 1 2 1 , " . / _ i s I t e r a t e e C a l l " : 1 8 2 } ] , 1 4 8 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r i s A r r a y L i k e = r e q u i r e ( " . / i s A r r a y L i k e " ) ;
/ * *
* Creates a ` baseEach ` or ` baseEachRight ` function .
*
* @ private
* @ param { Function } eachFunc The function to iterate over a collection .
* @ param { boolean } [ fromRight ] Specify iterating from right to left .
* @ returns { Function } Returns the new base function .
* / f u n c t i o n c r e a t e B a s e E a c h ( e a c h F u n c , f r o m R i g h t ) { r e t u r n f u n c t i o n ( c o l l e c t i o n , i t e r a t e e ) { i f ( c o l l e c t i o n = = n u l l ) { r e t u r n c o l l e c t i o n } i f ( ! i s A r r a y L i k e ( c o l l e c t i o n ) ) { r e t u r n e a c h F u n c ( c o l l e c t i o n , i t e r a t e e ) } v a r l e n g t h = c o l l e c t i o n . l e n g t h , i n d e x = f r o m R i g h t ? l e n g t h : - 1 , i t e r a b l e = O b j e c t ( c o l l e c t i o n ) ; w h i l e ( f r o m R i g h t ? i n d e x - - : + + i n d e x < l e n g t h ) { i f ( i t e r a t e e ( i t e r a b l e [ i n d e x ] , i n d e x , i t e r a b l e ) = = = f a l s e ) { b r e a k } } r e t u r n c o l l e c t i o n } } m o d u l e . e x p o r t s = c r e a t e B a s e E a c h } , { " . / i s A r r a y L i k e " : 2 4 4 } ] , 1 4 9 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) {
/ * *
* Creates a base function for methods like ` _.forIn ` and ` _.forOwn ` .
*
* @ private
* @ param { boolean } [ fromRight ] Specify iterating from right to left .
* @ returns { Function } Returns the new base function .
* /
function createBaseFor ( fromRight ) { return function ( object , iteratee , keysFunc ) { var index = - 1 , iterable = Object ( object ) , props = keysFunc ( object ) , length = props . length ; while ( length -- ) { var key = props [ fromRight ? length : ++ index ] ; if ( iteratee ( iterable [ key ] , key , iterable ) === false ) { break } } return object } } module . exports = createBaseFor } , { } ] , 150 : [ function ( require , module , exports ) { var baseIteratee = require ( "./_baseIteratee" ) , isArrayLike = require ( "./isArrayLike" ) , keys = require ( "./keys" ) ;
/ * *
* Creates a ` _.find ` or ` _.findLast ` function .
*
* @ private
* @ param { Function } findIndexFunc The function to find the collection index .
* @ returns { Function } Returns the new find function .
* / f u n c t i o n c r e a t e F i n d ( f i n d I n d e x F u n c ) { r e t u r n f u n c t i o n ( c o l l e c t i o n , p r e d i c a t e , f r o m I n d e x ) { v a r i t e r a b l e = O b j e c t ( c o l l e c t i o n ) ; i f ( ! i s A r r a y L i k e ( c o l l e c t i o n ) ) { v a r i t e r a t e e = b a s e I t e r a t e e ( p r e d i c a t e , 3 ) ; c o l l e c t i o n = k e y s ( c o l l e c t i o n ) ; p r e d i c a t e = f u n c t i o n ( k e y ) { r e t u r n i t e r a t e e ( i t e r a b l e [ k e y ] , k e y , i t e r a b l e ) } } v a r i n d e x = f i n d I n d e x F u n c ( c o l l e c t i o n , p r e d i c a t e , f r o m I n d e x ) ; r e t u r n i n d e x > - 1 ? i t e r a b l e [ i t e r a t e e ? c o l l e c t i o n [ i n d e x ] : i n d e x ] : u n d e f i n e d } } m o d u l e . e x p o r t s = c r e a t e F i n d } , { " . / _ b a s e I t e r a t e e " : 1 0 5 , " . / i s A r r a y L i k e " : 2 4 4 , " . / k e y s " : 2 5 9 } ] , 1 5 1 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r b a s e R a n g e = r e q u i r e ( " . / _ b a s e R a n g e " ) , i s I t e r a t e e C a l l = r e q u i r e ( " . / _ i s I t e r a t e e C a l l " ) , t o F i n i t e = r e q u i r e ( " . / t o F i n i t e " ) ;
/ * *
* Creates a ` _.range ` or ` _.rangeRight ` function .
*
* @ private
* @ param { boolean } [ fromRight ] Specify iterating from right to left .
* @ returns { Function } Returns the new range function .
* / f u n c t i o n c r e a t e R a n g e ( f r o m R i g h t ) { r e t u r n f u n c t i o n ( s t a r t , e n d , s t e p ) { i f ( s t e p & & t y p e o f s t e p ! = " n u m b e r " & & i s I t e r a t e e C a l l ( s t a r t , e n d , s t e p ) ) { e n d = s t e p = u n d e f i n e d }
// Ensure the sign of `-0` is preserved.
start = toFinite ( start ) ; if ( end === undefined ) { end = start ; start = 0 } else { end = toFinite ( end ) } step = step === undefined ? start < end ? 1 : - 1 : toFinite ( step ) ; return baseRange ( start , end , step , fromRight ) } } module . exports = createRange } , { "./_baseRange" : 119 , "./_isIterateeCall" : 182 , "./toFinite" : 279 } ] , 152 : [ function ( require , module , exports ) { var Set = require ( "./_Set" ) , noop = require ( "./noop" ) , setToArray = require ( "./_setToArray" ) ;
/** Used as references for various `Number` constants. */ var INFINITY = 1 / 0 ;
/ * *
* Creates a set object of ` values ` .
*
* @ private
* @ param { Array } values The values to add to the set .
* @ returns { Object } Returns the new set .
* / v a r c r e a t e S e t = ! ( S e t & & 1 / s e t T o A r r a y ( n e w S e t ( [ , - 0 ] ) ) [ 1 ] = = I N F I N I T Y ) ? n o o p : f u n c t i o n ( v a l u e s ) { r e t u r n n e w S e t ( v a l u e s ) } ; m o d u l e . e x p o r t s = c r e a t e S e t } , { " . / _ S e t " : 5 7 , " . / _ s e t T o A r r a y " : 2 1 2 , " . / n o o p " : 2 6 9 } ] , 1 5 3 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r g e t N a t i v e = r e q u i r e ( " . / _ g e t N a t i v e " ) ; v a r d e f i n e P r o p e r t y = f u n c t i o n ( ) { t r y { v a r f u n c = g e t N a t i v e ( O b j e c t , " d e f i n e P r o p e r t y " ) ; f u n c ( { } , " " , { } ) ; r e t u r n f u n c } c a t c h ( e ) { } } ( ) ; m o d u l e . e x p o r t s = d e f i n e P r o p e r t y } , { " . / _ g e t N a t i v e " : 1 6 3 } ] , 1 5 4 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r S e t C a c h e = r e q u i r e ( " . / _ S e t C a c h e " ) , a r r a y S o m e = r e q u i r e ( " . / _ a r r a y S o m e " ) , c a c h e H a s = r e q u i r e ( " . / _ c a c h e H a s " ) ;
/** Used to compose bitmasks for value comparisons. */ var COMPARE _PARTIAL _FLAG = 1 , COMPARE _UNORDERED _FLAG = 2 ;
/ * *
* A specialized version of ` baseIsEqualDeep ` for arrays with support for
* partial deep comparisons .
*
* @ private
* @ param { Array } array The array to compare .
* @ param { Array } other The other array to compare .
* @ param { number } bitmask The bitmask flags . See ` baseIsEqual ` for more details .
* @ param { Function } customizer The function to customize comparisons .
* @ param { Function } equalFunc The function to determine equivalents of values .
* @ param { Object } stack Tracks traversed ` array ` and ` other ` objects .
* @ returns { boolean } Returns ` true ` if the arrays are equivalent , else ` false ` .
* / f u n c t i o n e q u a l A r r a y s ( a r r a y , o t h e r , b i t m a s k , c u s t o m i z e r , e q u a l F u n c , s t a c k ) { v a r i s P a r t i a l = b i t m a s k & C O M P A R E _ P A R T I A L _ F L A G , a r r L e n g t h = a r r a y . l e n g t h , o t h L e n g t h = o t h e r . l e n g t h ; i f ( a r r L e n g t h ! = o t h L e n g t h & & ! ( i s P a r t i a l & & o t h L e n g t h > a r r L e n g t h ) ) { r e t u r n f a l s e }
// Assume cyclic values are equal.
var stacked = stack . get ( array ) ; if ( stacked && stack . get ( other ) ) { return stacked == other } var index = - 1 , result = true , seen = bitmask & COMPARE _UNORDERED _FLAG ? new SetCache : undefined ; stack . set ( array , other ) ; stack . set ( other , array ) ;
// Ignore non-index properties.
while ( ++ index < arrLength ) { var arrValue = array [ index ] , othValue = other [ index ] ; if ( customizer ) { var compared = isPartial ? customizer ( othValue , arrValue , index , other , array , stack ) : customizer ( arrValue , othValue , index , array , other , stack ) } if ( compared !== undefined ) { if ( compared ) { continue } result = false ; break }
// Recursively compare arrays (susceptible to call stack limits).
if ( seen ) { if ( ! arraySome ( other , function ( othValue , othIndex ) { if ( ! cacheHas ( seen , othIndex ) && ( arrValue === othValue || equalFunc ( arrValue , othValue , bitmask , customizer , stack ) ) ) { return seen . push ( othIndex ) } } ) ) { result = false ; break } } else if ( ! ( arrValue === othValue || equalFunc ( arrValue , othValue , bitmask , customizer , stack ) ) ) { result = false ; break } } stack [ "delete" ] ( array ) ; stack [ "delete" ] ( other ) ; return result } module . exports = equalArrays } , { "./_SetCache" : 58 , "./_arraySome" : 72 , "./_cacheHas" : 131 } ] , 155 : [ function ( require , module , exports ) { var Symbol = require ( "./_Symbol" ) , Uint8Array = require ( "./_Uint8Array" ) , eq = require ( "./eq" ) , equalArrays = require ( "./_equalArrays" ) , mapToArray = require ( "./_mapToArray" ) , setToArray = require ( "./_setToArray" ) ;
/** Used to compose bitmasks for value comparisons. */ var COMPARE _PARTIAL _FLAG = 1 , COMPARE _UNORDERED _FLAG = 2 ;
/** `Object#toString` result references. */ var boolTag = "[object Boolean]" , dateTag = "[object Date]" , errorTag = "[object Error]" , mapTag = "[object Map]" , numberTag = "[object Number]" , regexpTag = "[object RegExp]" , setTag = "[object Set]" , stringTag = "[object String]" , symbolTag = "[object Symbol]" ; var arrayBufferTag = "[object ArrayBuffer]" , dataViewTag = "[object DataView]" ;
/** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol ? Symbol . prototype : undefined , symbolValueOf = symbolProto ? symbolProto . valueOf : undefined ;
/ * *
* A specialized version of ` baseIsEqualDeep ` for comparing objects of
* the same ` toStringTag ` .
*
* * * Note : * * This function only supports comparing values with tags of
* ` Boolean ` , ` Date ` , ` Error ` , ` Number ` , ` RegExp ` , or ` String ` .
*
* @ private
* @ param { Object } object The object to compare .
* @ param { Object } other The other object to compare .
* @ param { string } tag The ` toStringTag ` of the objects to compare .
* @ param { number } bitmask The bitmask flags . See ` baseIsEqual ` for more details .
* @ param { Function } customizer The function to customize comparisons .
* @ param { Function } equalFunc The function to determine equivalents of values .
* @ param { Object } stack Tracks traversed ` object ` and ` other ` objects .
* @ returns { boolean } Returns ` true ` if the objects are equivalent , else ` false ` .
* / f u n c t i o n e q u a l B y T a g ( o b j e c t , o t h e r , t a g , b i t m a s k , c u s t o m i z e r , e q u a l F u n c , s t a c k ) { s w i t c h ( t a g ) { c a s e d a t a V i e w T a g : i f ( o b j e c t . b y t e L e n g t h ! = o t h e r . b y t e L e n g t h | | o b j e c t . b y t e O f f s e t ! = o t h e r . b y t e O f f s e t ) { r e t u r n f a l s e } o b j e c t = o b j e c t . b u f f e r ; o t h e r = o t h e r . b u f f e r ; c a s e a r r a y B u f f e r T a g : i f ( o b j e c t . b y t e L e n g t h ! = o t h e r . b y t e L e n g t h | | ! e q u a l F u n c ( n e w U i n t 8 A r r a y ( o b j e c t ) , n e w U i n t 8 A r r a y ( o t h e r ) ) ) { r e t u r n f a l s e } r e t u r n t r u e ; c a s e b o o l T a g : c a s e d a t e T a g : c a s e n u m b e r T a g :
// Coerce booleans to `1` or `0` and dates to milliseconds.
// Invalid dates are coerced to `NaN`.
return eq ( + object , + other ) ; case errorTag : return object . name == other . name && object . message == other . message ; case regexpTag : case stringTag :
// Coerce regexes to strings and treat strings, primitives and objects,
// as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
// for more details.
return object == other + "" ; case mapTag : var convert = mapToArray ; case setTag : var isPartial = bitmask & COMPARE _PARTIAL _FLAG ; convert || ( convert = setToArray ) ; if ( object . size != other . size && ! isPartial ) { return false }
// Assume cyclic values are equal.
var stacked = stack . get ( object ) ; if ( stacked ) { return stacked == other } bitmask |= COMPARE _UNORDERED _FLAG ;
// Recursively compare objects (susceptible to call stack limits).
stack . set ( object , other ) ; var result = equalArrays ( convert ( object ) , convert ( other ) , bitmask , customizer , equalFunc , stack ) ; stack [ "delete" ] ( object ) ; return result ; case symbolTag : if ( symbolValueOf ) { return symbolValueOf . call ( object ) == symbolValueOf . call ( other ) } } return false } module . exports = equalByTag } , { "./_Symbol" : 60 , "./_Uint8Array" : 61 , "./_equalArrays" : 154 , "./_mapToArray" : 198 , "./_setToArray" : 212 , "./eq" : 231 } ] , 156 : [ function ( require , module , exports ) { var getAllKeys = require ( "./_getAllKeys" ) ;
/** Used to compose bitmasks for value comparisons. */ var COMPARE _PARTIAL _FLAG = 1 ;
/** Used for built-in method references. */ var objectProto = Object . prototype ;
/** Used to check objects for own properties. */ var hasOwnProperty = objectProto . hasOwnProperty ;
/ * *
* A specialized version of ` baseIsEqualDeep ` for objects with support for
* partial deep comparisons .
*
* @ private
* @ param { Object } object The object to compare .
* @ param { Object } other The other object to compare .
* @ param { number } bitmask The bitmask flags . See ` baseIsEqual ` for more details .
* @ param { Function } customizer The function to customize comparisons .
* @ param { Function } equalFunc The function to determine equivalents of values .
* @ param { Object } stack Tracks traversed ` object ` and ` other ` objects .
* @ returns { boolean } Returns ` true ` if the objects are equivalent , else ` false ` .
* / f u n c t i o n e q u a l O b j e c t s ( o b j e c t , o t h e r , b i t m a s k , c u s t o m i z e r , e q u a l F u n c , s t a c k ) { v a r i s P a r t i a l = b i t m a s k & C O M P A R E _ P A R T I A L _ F L A G , o b j P r o p s = g e t A l l K e y s ( o b j e c t ) , o b j L e n g t h = o b j P r o p s . l e n g t h , o t h P r o p s = g e t A l l K e y s ( o t h e r ) , o t h L e n g t h = o t h P r o p s . l e n g t h ; i f ( o b j L e n g t h ! = o t h L e n g t h & & ! i s P a r t i a l ) { r e t u r n f a l s e } v a r i n d e x = o b j L e n g t h ; w h i l e ( i n d e x - - ) { v a r k e y = o b j P r o p s [ i n d e x ] ; i f ( ! ( i s P a r t i a l ? k e y i n o t h e r : h a s O w n P r o p e r t y . c a l l ( o t h e r , k e y ) ) ) { r e t u r n f a l s e } }
// Assume cyclic values are equal.
var stacked = stack . get ( object ) ; if ( stacked && stack . get ( other ) ) { return stacked == other } var result = true ; stack . set ( object , other ) ; stack . set ( other , object ) ; var skipCtor = isPartial ; while ( ++ index < objLength ) { key = objProps [ index ] ; var objValue = object [ key ] , othValue = other [ key ] ; if ( customizer ) { var compared = isPartial ? customizer ( othValue , objValue , key , other , object , stack ) : customizer ( objValue , othValue , key , object , other , stack ) }
// Recursively compare objects (susceptible to call stack limits).
if ( ! ( compared === undefined ? objValue === othValue || equalFunc ( objValue , othValue , bitmask , customizer , stack ) : compared ) ) { result = false ; break } skipCtor || ( skipCtor = key == "constructor" ) } if ( result && ! skipCtor ) { var objCtor = object . constructor , othCtor = other . constructor ;
// Non `Object` object instances with different constructors are not equal.
if ( objCtor != othCtor && ( "constructor" in object && "constructor" in other ) && ! ( typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor ) ) { result = false } } stack [ "delete" ] ( object ) ; stack [ "delete" ] ( other ) ; return result } module . exports = equalObjects } , { "./_getAllKeys" : 159 } ] , 157 : [ function ( require , module , exports ) { var flatten = require ( "./flatten" ) , overRest = require ( "./_overRest" ) , setToString = require ( "./_setToString" ) ;
/ * *
* A specialized version of ` baseRest ` which flattens the rest array .
*
* @ private
* @ param { Function } func The function to apply a rest parameter to .
* @ returns { Function } Returns the new function .
* / f u n c t i o n f l a t R e s t ( f u n c ) { r e t u r n s e t T o S t r i n g ( o v e r R e s t ( f u n c , u n d e f i n e d , f l a t t e n ) , f u n c + " " ) } m o d u l e . e x p o r t s = f l a t R e s t } , { " . / _ o v e r R e s t " : 2 0 7 , " . / _ s e t T o S t r i n g " : 2 1 3 , " . / f l a t t e n " : 2 3 5 } ] , 1 5 8 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { ( f u n c t i o n ( g l o b a l ) {
/** Detect free variable `global` from Node.js. */
var freeGlobal = typeof global == "object" && global && global . Object === Object && global ; module . exports = freeGlobal } ) . call ( this , typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : { } ) } , { } ] , 159 : [ function ( require , module , exports ) { var baseGetAllKeys = require ( "./_baseGetAllKeys" ) , getSymbols = require ( "./_getSymbols" ) , keys = require ( "./keys" ) ;
/ * *
* Creates an array of own enumerable property names and symbols of ` object ` .
*
* @ private
* @ param { Object } object The object to query .
* @ returns { Array } Returns the array of property names and symbols .
* / f u n c t i o n g e t A l l K e y s ( o b j e c t ) { r e t u r n b a s e G e t A l l K e y s ( o b j e c t , k e y s , g e t S y m b o l s ) } m o d u l e . e x p o r t s = g e t A l l K e y s } , { " . / _ b a s e G e t A l l K e y s " : 9 0 , " . / _ g e t S y m b o l s " : 1 6 6 , " . / k e y s " : 2 5 9 } ] , 1 6 0 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r b a s e G e t A l l K e y s = r e q u i r e ( " . / _ b a s e G e t A l l K e y s " ) , g e t S y m b o l s I n = r e q u i r e ( " . / _ g e t S y m b o l s I n " ) , k e y s I n = r e q u i r e ( " . / k e y s I n " ) ;
/ * *
* Creates an array of own and inherited enumerable property names and
* symbols of ` object ` .
*
* @ private
* @ param { Object } object The object to query .
* @ returns { Array } Returns the array of property names and symbols .
* / f u n c t i o n g e t A l l K e y s I n ( o b j e c t ) { r e t u r n b a s e G e t A l l K e y s ( o b j e c t , k e y s I n , g e t S y m b o l s I n ) } m o d u l e . e x p o r t s = g e t A l l K e y s I n } , { " . / _ b a s e G e t A l l K e y s " : 9 0 , " . / _ g e t S y m b o l s I n " : 1 6 7 , " . / k e y s I n " : 2 6 0 } ] , 1 6 1 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r i s K e y a b l e = r e q u i r e ( " . / _ i s K e y a b l e " ) ;
/ * *
* Gets the data for ` map ` .
*
* @ private
* @ param { Object } map The map to query .
* @ param { string } key The reference key .
* @ returns { * } Returns the map data .
* / f u n c t i o n g e t M a p D a t a ( m a p , k e y ) { v a r d a t a = m a p . _ _ d a t a _ _ ; r e t u r n i s K e y a b l e ( k e y ) ? d a t a [ t y p e o f k e y = = " s t r i n g " ? " s t r i n g " : " h a s h " ] : d a t a . m a p } m o d u l e . e x p o r t s = g e t M a p D a t a } , { " . / _ i s K e y a b l e " : 1 8 4 } ] , 1 6 2 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r i s S t r i c t C o m p a r a b l e = r e q u i r e ( " . / _ i s S t r i c t C o m p a r a b l e " ) , k e y s = r e q u i r e ( " . / k e y s " ) ;
/ * *
* Gets the property names , values , and compare flags of ` object ` .
*
* @ private
* @ param { Object } object The object to query .
* @ returns { Array } Returns the match data of ` object ` .
* / f u n c t i o n g e t M a t c h D a t a ( o b j e c t ) { v a r r e s u l t = k e y s ( o b j e c t ) , l e n g t h = r e s u l t . l e n g t h ; w h i l e ( l e n g t h - - ) { v a r k e y = r e s u l t [ l e n g t h ] , v a l u e = o b j e c t [ k e y ] ; r e s u l t [ l e n g t h ] = [ k e y , v a l u e , i s S t r i c t C o m p a r a b l e ( v a l u e ) ] } r e t u r n r e s u l t } m o d u l e . e x p o r t s = g e t M a t c h D a t a } , { " . / _ i s S t r i c t C o m p a r a b l e " : 1 8 7 , " . / k e y s " : 2 5 9 } ] , 1 6 3 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r b a s e I s N a t i v e = r e q u i r e ( " . / _ b a s e I s N a t i v e " ) , g e t V a l u e = r e q u i r e ( " . / _ g e t V a l u e " ) ;
/ * *
* Gets the native function at ` key ` of ` object ` .
*
* @ private
* @ param { Object } object The object to query .
* @ param { string } key The key of the method to get .
* @ returns { * } Returns the function if it ' s native , else ` undefined ` .
* / f u n c t i o n g e t N a t i v e ( o b j e c t , k e y ) { v a r v a l u e = g e t V a l u e ( o b j e c t , k e y ) ; r e t u r n b a s e I s N a t i v e ( v a l u e ) ? v a l u e : u n d e f i n e d } m o d u l e . e x p o r t s = g e t N a t i v e } , { " . / _ b a s e I s N a t i v e " : 1 0 2 , " . / _ g e t V a l u e " : 1 6 9 } ] , 1 6 4 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r o v e r A r g = r e q u i r e ( " . / _ o v e r A r g " ) ;
/** Built-in value references. */ var getPrototype = overArg ( Object . getPrototypeOf , Object ) ; module . exports = getPrototype } , { "./_overArg" : 206 } ] , 165 : [ function ( require , module , exports ) { var Symbol = require ( "./_Symbol" ) ;
/** Used for built-in method references. */ var objectProto = Object . prototype ;
/** Used to check objects for own properties. */ var hasOwnProperty = objectProto . hasOwnProperty ;
/ * *
* Used to resolve the
2022-12-26 16:47:39 +00:00
* [ ` toStringTag ` ] ( https : //262.ecma-international.org/7.0/#sec-object.prototype.tostring)
2022-12-03 18:54:54 +00:00
* of values .
* / v a r n a t i v e O b j e c t T o S t r i n g = o b j e c t P r o t o . t o S t r i n g ;
/** Built-in value references. */ var symToStringTag = Symbol ? Symbol . toStringTag : undefined ;
/ * *
* A specialized version of ` baseGetTag ` which ignores ` Symbol.toStringTag ` values .
*
* @ private
* @ param { * } value The value to query .
* @ returns { string } Returns the raw ` toStringTag ` .
* / f u n c t i o n g e t R a w T a g ( v a l u e ) { v a r i s O w n = h a s O w n P r o p e r t y . c a l l ( v a l u e , s y m T o S t r i n g T a g ) , t a g = v a l u e [ s y m T o S t r i n g T a g ] ; t r y { v a l u e [ s y m T o S t r i n g T a g ] = u n d e f i n e d ; v a r u n m a s k e d = t r u e } c a t c h ( e ) { } v a r r e s u l t = n a t i v e O b j e c t T o S t r i n g . c a l l ( v a l u e ) ; i f ( u n m a s k e d ) { i f ( i s O w n ) { v a l u e [ s y m T o S t r i n g T a g ] = t a g } e l s e { d e l e t e v a l u e [ s y m T o S t r i n g T a g ] } } r e t u r n r e s u l t } m o d u l e . e x p o r t s = g e t R a w T a g } , { " . / _ S y m b o l " : 6 0 } ] , 1 6 6 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r a r r a y F i l t e r = r e q u i r e ( " . / _ a r r a y F i l t e r " ) , s t u b A r r a y = r e q u i r e ( " . / s t u b A r r a y " ) ;
/** Used for built-in method references. */ var objectProto = Object . prototype ;
/** Built-in value references. */ var propertyIsEnumerable = objectProto . propertyIsEnumerable ;
/* Built-in method references for those with the same name as other `lodash` methods. */ var nativeGetSymbols = Object . getOwnPropertySymbols ;
/ * *
* Creates an array of the own enumerable symbols of ` object ` .
*
* @ private
* @ param { Object } object The object to query .
* @ returns { Array } Returns the array of symbols .
* / v a r g e t S y m b o l s = ! n a t i v e G e t S y m b o l s ? s t u b A r r a y : f u n c t i o n ( o b j e c t ) { i f ( o b j e c t = = n u l l ) { r e t u r n [ ] } o b j e c t = O b j e c t ( o b j e c t ) ; r e t u r n a r r a y F i l t e r ( n a t i v e G e t S y m b o l s ( o b j e c t ) , f u n c t i o n ( s y m b o l ) { r e t u r n p r o p e r t y I s E n u m e r a b l e . c a l l ( o b j e c t , s y m b o l ) } ) } ; m o d u l e . e x p o r t s = g e t S y m b o l s } , { " . / _ a r r a y F i l t e r " : 6 5 , " . / s t u b A r r a y " : 2 7 7 } ] , 1 6 7 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r a r r a y P u s h = r e q u i r e ( " . / _ a r r a y P u s h " ) , g e t P r o t o t y p e = r e q u i r e ( " . / _ g e t P r o t o t y p e " ) , g e t S y m b o l s = r e q u i r e ( " . / _ g e t S y m b o l s " ) , s t u b A r r a y = r e q u i r e ( " . / s t u b A r r a y " ) ;
/* Built-in method references for those with the same name as other `lodash` methods. */ var nativeGetSymbols = Object . getOwnPropertySymbols ;
/ * *
* Creates an array of the own and inherited enumerable symbols of ` object ` .
*
* @ private
* @ param { Object } object The object to query .
* @ returns { Array } Returns the array of symbols .
* / v a r g e t S y m b o l s I n = ! n a t i v e G e t S y m b o l s ? s t u b A r r a y : f u n c t i o n ( o b j e c t ) { v a r r e s u l t = [ ] ; w h i l e ( o b j e c t ) { a r r a y P u s h ( r e s u l t , g e t S y m b o l s ( o b j e c t ) ) ; o b j e c t = g e t P r o t o t y p e ( o b j e c t ) } r e t u r n r e s u l t } ; m o d u l e . e x p o r t s = g e t S y m b o l s I n } , { " . / _ a r r a y P u s h " : 7 0 , " . / _ g e t P r o t o t y p e " : 1 6 4 , " . / _ g e t S y m b o l s " : 1 6 6 , " . / s t u b A r r a y " : 2 7 7 } ] , 1 6 8 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r D a t a V i e w = r e q u i r e ( " . / _ D a t a V i e w " ) , M a p = r e q u i r e ( " . / _ M a p " ) , P r o m i s e = r e q u i r e ( " . / _ P r o m i s e " ) , S e t = r e q u i r e ( " . / _ S e t " ) , W e a k M a p = r e q u i r e ( " . / _ W e a k M a p " ) , b a s e G e t T a g = r e q u i r e ( " . / _ b a s e G e t T a g " ) , t o S o u r c e = r e q u i r e ( " . / _ t o S o u r c e " ) ;
/** `Object#toString` result references. */ var mapTag = "[object Map]" , objectTag = "[object Object]" , promiseTag = "[object Promise]" , setTag = "[object Set]" , weakMapTag = "[object WeakMap]" ; var dataViewTag = "[object DataView]" ;
/** Used to detect maps, sets, and weakmaps. */ var dataViewCtorString = toSource ( DataView ) , mapCtorString = toSource ( Map ) , promiseCtorString = toSource ( Promise ) , setCtorString = toSource ( Set ) , weakMapCtorString = toSource ( WeakMap ) ;
/ * *
* Gets the ` toStringTag ` of ` value ` .
*
* @ private
* @ param { * } value The value to query .
* @ returns { string } Returns the ` toStringTag ` .
* / v a r g e t T a g = b a s e G e t T a g ;
// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
if ( DataView && getTag ( new DataView ( new ArrayBuffer ( 1 ) ) ) != dataViewTag || Map && getTag ( new Map ) != mapTag || Promise && getTag ( Promise . resolve ( ) ) != promiseTag || Set && getTag ( new Set ) != setTag || WeakMap && getTag ( new WeakMap ) != weakMapTag ) { getTag = function ( value ) { var result = baseGetTag ( value ) , Ctor = result == objectTag ? value . constructor : undefined , ctorString = Ctor ? toSource ( Ctor ) : "" ; if ( ctorString ) { switch ( ctorString ) { case dataViewCtorString : return dataViewTag ; case mapCtorString : return mapTag ; case promiseCtorString : return promiseTag ; case setCtorString : return setTag ; case weakMapCtorString : return weakMapTag } } return result } } module . exports = getTag } , { "./_DataView" : 51 , "./_Map" : 54 , "./_Promise" : 56 , "./_Set" : 57 , "./_WeakMap" : 62 , "./_baseGetTag" : 91 , "./_toSource" : 224 } ] , 169 : [ function ( require , module , exports ) {
/ * *
* Gets the value at ` key ` of ` object ` .
*
* @ private
* @ param { Object } [ object ] The object to query .
* @ param { string } key The key of the property to get .
* @ returns { * } Returns the property value .
* /
function getValue ( object , key ) { return object == null ? undefined : object [ key ] } module . exports = getValue } , { } ] , 170 : [ function ( require , module , exports ) { var castPath = require ( "./_castPath" ) , isArguments = require ( "./isArguments" ) , isArray = require ( "./isArray" ) , isIndex = require ( "./_isIndex" ) , isLength = require ( "./isLength" ) , toKey = require ( "./_toKey" ) ;
/ * *
* Checks if ` path ` exists on ` object ` .
*
* @ private
* @ param { Object } object The object to query .
* @ param { Array | string } path The path to check .
* @ param { Function } hasFunc The function to check properties .
* @ returns { boolean } Returns ` true ` if ` path ` exists , else ` false ` .
* / f u n c t i o n h a s P a t h ( o b j e c t , p a t h , h a s F u n c ) { p a t h = c a s t P a t h ( p a t h , o b j e c t ) ; v a r i n d e x = - 1 , l e n g t h = p a t h . l e n g t h , r e s u l t = f a l s e ; w h i l e ( + + i n d e x < l e n g t h ) { v a r k e y = t o K e y ( p a t h [ i n d e x ] ) ; i f ( ! ( r e s u l t = o b j e c t ! = n u l l & & h a s F u n c ( o b j e c t , k e y ) ) ) { b r e a k } o b j e c t = o b j e c t [ k e y ] } i f ( r e s u l t | | + + i n d e x ! = l e n g t h ) { r e t u r n r e s u l t } l e n g t h = o b j e c t = = n u l l ? 0 : o b j e c t . l e n g t h ; r e t u r n ! ! l e n g t h & & i s L e n g t h ( l e n g t h ) & & i s I n d e x ( k e y , l e n g t h ) & & ( i s A r r a y ( o b j e c t ) | | i s A r g u m e n t s ( o b j e c t ) ) } m o d u l e . e x p o r t s = h a s P a t h } , { " . / _ c a s t P a t h " : 1 3 3 , " . / _ i s I n d e x " : 1 8 1 , " . / _ t o K e y " : 2 2 3 , " . / i s A r g u m e n t s " : 2 4 2 , " . / i s A r r a y " : 2 4 3 , " . / i s L e n g t h " : 2 4 9 } ] , 1 7 1 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) {
/** Used to compose unicode character classes. */
var rsAstralRange = "\\ud800-\\udfff" , rsComboMarksRange = "\\u0300-\\u036f" , reComboHalfMarksRange = "\\ufe20-\\ufe2f" , rsComboSymbolsRange = "\\u20d0-\\u20ff" , rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange , rsVarRange = "\\ufe0e\\ufe0f" ;
/** Used to compose unicode capture groups. */ var rsZWJ = "\\u200d" ;
/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ var reHasUnicode = RegExp ( "[" + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + "]" ) ;
/ * *
* Checks if ` string ` contains Unicode symbols .
*
* @ private
* @ param { string } string The string to inspect .
* @ returns { boolean } Returns ` true ` if a symbol is found , else ` false ` .
* / f u n c t i o n h a s U n i c o d e ( s t r i n g ) { r e t u r n r e H a s U n i c o d e . t e s t ( s t r i n g ) } m o d u l e . e x p o r t s = h a s U n i c o d e } , { } ] , 1 7 2 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r n a t i v e C r e a t e = r e q u i r e ( " . / _ n a t i v e C r e a t e " ) ;
/ * *
* Removes all key - value entries from the hash .
*
* @ private
* @ name clear
* @ memberOf Hash
* / f u n c t i o n h a s h C l e a r ( ) { t h i s . _ _ d a t a _ _ = n a t i v e C r e a t e ? n a t i v e C r e a t e ( n u l l ) : { } ; t h i s . s i z e = 0 } m o d u l e . e x p o r t s = h a s h C l e a r } , { " . / _ n a t i v e C r e a t e " : 2 0 1 } ] , 1 7 3 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) {
/ * *
* Removes ` key ` and its value from the hash .
*
* @ private
* @ name delete
* @ memberOf Hash
* @ param { Object } hash The hash to modify .
* @ param { string } key The key of the value to remove .
* @ returns { boolean } Returns ` true ` if the entry was removed , else ` false ` .
* /
function hashDelete ( key ) { var result = this . has ( key ) && delete this . _ _data _ _ [ key ] ; this . size -= result ? 1 : 0 ; return result } module . exports = hashDelete } , { } ] , 174 : [ function ( require , module , exports ) { var nativeCreate = require ( "./_nativeCreate" ) ;
/** Used to stand-in for `undefined` hash values. */ var HASH _UNDEFINED = "__lodash_hash_undefined__" ;
/** Used for built-in method references. */ var objectProto = Object . prototype ;
/** Used to check objects for own properties. */ var hasOwnProperty = objectProto . hasOwnProperty ;
/ * *
* Gets the hash value for ` key ` .
*
* @ private
* @ name get
* @ memberOf Hash
* @ param { string } key The key of the value to get .
* @ returns { * } Returns the entry value .
* / f u n c t i o n h a s h G e t ( k e y ) { v a r d a t a = t h i s . _ _ d a t a _ _ ; i f ( n a t i v e C r e a t e ) { v a r r e s u l t = d a t a [ k e y ] ; r e t u r n r e s u l t = = = H A S H _ U N D E F I N E D ? u n d e f i n e d : r e s u l t } r e t u r n h a s O w n P r o p e r t y . c a l l ( d a t a , k e y ) ? d a t a [ k e y ] : u n d e f i n e d } m o d u l e . e x p o r t s = h a s h G e t } , { " . / _ n a t i v e C r e a t e " : 2 0 1 } ] , 1 7 5 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r n a t i v e C r e a t e = r e q u i r e ( " . / _ n a t i v e C r e a t e " ) ;
/** Used for built-in method references. */ var objectProto = Object . prototype ;
/** Used to check objects for own properties. */ var hasOwnProperty = objectProto . hasOwnProperty ;
/ * *
* Checks if a hash value for ` key ` exists .
*
* @ private
* @ name has
* @ memberOf Hash
* @ param { string } key The key of the entry to check .
* @ returns { boolean } Returns ` true ` if an entry for ` key ` exists , else ` false ` .
* / f u n c t i o n h a s h H a s ( k e y ) { v a r d a t a = t h i s . _ _ d a t a _ _ ; r e t u r n n a t i v e C r e a t e ? d a t a [ k e y ] ! = = u n d e f i n e d : h a s O w n P r o p e r t y . c a l l ( d a t a , k e y ) } m o d u l e . e x p o r t s = h a s h H a s } , { " . / _ n a t i v e C r e a t e " : 2 0 1 } ] , 1 7 6 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r n a t i v e C r e a t e = r e q u i r e ( " . / _ n a t i v e C r e a t e " ) ;
/** Used to stand-in for `undefined` hash values. */ var HASH _UNDEFINED = "__lodash_hash_undefined__" ;
/ * *
* Sets the hash ` key ` to ` value ` .
*
* @ private
* @ name set
* @ memberOf Hash
* @ param { string } key The key of the value to set .
* @ param { * } value The value to set .
* @ returns { Object } Returns the hash instance .
* / f u n c t i o n h a s h S e t ( k e y , v a l u e ) { v a r d a t a = t h i s . _ _ d a t a _ _ ; t h i s . s i z e + = t h i s . h a s ( k e y ) ? 0 : 1 ; d a t a [ k e y ] = n a t i v e C r e a t e & & v a l u e = = = u n d e f i n e d ? H A S H _ U N D E F I N E D : v a l u e ; r e t u r n t h i s } m o d u l e . e x p o r t s = h a s h S e t } , { " . / _ n a t i v e C r e a t e " : 2 0 1 } ] , 1 7 7 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) {
/** Used for built-in method references. */
var objectProto = Object . prototype ;
/** Used to check objects for own properties. */ var hasOwnProperty = objectProto . hasOwnProperty ;
/ * *
* Initializes an array clone .
*
* @ private
* @ param { Array } array The array to clone .
* @ returns { Array } Returns the initialized clone .
* / f u n c t i o n i n i t C l o n e A r r a y ( a r r a y ) { v a r l e n g t h = a r r a y . l e n g t h , r e s u l t = n e w a r r a y . c o n s t r u c t o r ( l e n g t h ) ;
// Add properties assigned by `RegExp#exec`.
if ( length && typeof array [ 0 ] == "string" && hasOwnProperty . call ( array , "index" ) ) { result . index = array . index ; result . input = array . input } return result } module . exports = initCloneArray } , { } ] , 178 : [ function ( require , module , exports ) { var cloneArrayBuffer = require ( "./_cloneArrayBuffer" ) , cloneDataView = require ( "./_cloneDataView" ) , cloneRegExp = require ( "./_cloneRegExp" ) , cloneSymbol = require ( "./_cloneSymbol" ) , cloneTypedArray = require ( "./_cloneTypedArray" ) ;
/** `Object#toString` result references. */ var boolTag = "[object Boolean]" , dateTag = "[object Date]" , mapTag = "[object Map]" , numberTag = "[object Number]" , regexpTag = "[object RegExp]" , setTag = "[object Set]" , stringTag = "[object String]" , symbolTag = "[object Symbol]" ; var arrayBufferTag = "[object ArrayBuffer]" , dataViewTag = "[object DataView]" , float32Tag = "[object Float32Array]" , float64Tag = "[object Float64Array]" , int8Tag = "[object Int8Array]" , int16Tag = "[object Int16Array]" , int32Tag = "[object Int32Array]" , uint8Tag = "[object Uint8Array]" , uint8ClampedTag = "[object Uint8ClampedArray]" , uint16Tag = "[object Uint16Array]" , uint32Tag = "[object Uint32Array]" ;
/ * *
* Initializes an object clone based on its ` toStringTag ` .
*
* * * Note : * * This function only supports cloning values with tags of
* ` Boolean ` , ` Date ` , ` Error ` , ` Map ` , ` Number ` , ` RegExp ` , ` Set ` , or ` String ` .
*
* @ private
* @ param { Object } object The object to clone .
* @ param { string } tag The ` toStringTag ` of the object to clone .
* @ param { boolean } [ isDeep ] Specify a deep clone .
* @ returns { Object } Returns the initialized clone .
* / f u n c t i o n i n i t C l o n e B y T a g ( o b j e c t , t a g , i s D e e p ) { v a r C t o r = o b j e c t . c o n s t r u c t o r ; s w i t c h ( t a g ) { c a s e a r r a y B u f f e r T a g : r e t u r n c l o n e A r r a y B u f f e r ( o b j e c t ) ; c a s e b o o l T a g : c a s e d a t e T a g : r e t u r n n e w C t o r ( + o b j e c t ) ; c a s e d a t a V i e w T a g : r e t u r n c l o n e D a t a V i e w ( o b j e c t , i s D e e p ) ; c a s e f l o a t 3 2 T a g : c a s e f l o a t 6 4 T a g : c a s e i n t 8 T a g : c a s e i n t 1 6 T a g : c a s e i n t 3 2 T a g : c a s e u i n t 8 T a g : c a s e u i n t 8 C l a m p e d T a g : c a s e u i n t 1 6 T a g : c a s e u i n t 3 2 T a g : r e t u r n c l o n e T y p e d A r r a y ( o b j e c t , i s D e e p ) ; c a s e m a p T a g : r e t u r n n e w C t o r ; c a s e n u m b e r T a g : c a s e s t r i n g T a g : r e t u r n n e w C t o r ( o b j e c t ) ; c a s e r e g e x p T a g : r e t u r n c l o n e R e g E x p ( o b j e c t ) ; c a s e s e t T a g : r e t u r n n e w C t o r ; c a s e s y m b o l T a g : r e t u r n c l o n e S y m b o l ( o b j e c t ) } } m o d u l e . e x p o r t s = i n i t C l o n e B y T a g } , { " . / _ c l o n e A r r a y B u f f e r " : 1 3 4 , " . / _ c l o n e D a t a V i e w " : 1 3 6 , " . / _ c l o n e R e g E x p " : 1 3 7 , " . / _ c l o n e S y m b o l " : 1 3 8 , " . / _ c l o n e T y p e d A r r a y " : 1 3 9 } ] , 1 7 9 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r b a s e C r e a t e = r e q u i r e ( " . / _ b a s e C r e a t e " ) , g e t P r o t o t y p e = r e q u i r e ( " . / _ g e t P r o t o t y p e " ) , i s P r o t o t y p e = r e q u i r e ( " . / _ i s P r o t o t y p e " ) ;
/ * *
* Initializes an object clone .
*
* @ private
* @ param { Object } object The object to clone .
* @ returns { Object } Returns the initialized clone .
* / f u n c t i o n i n i t C l o n e O b j e c t ( o b j e c t ) { r e t u r n t y p e o f o b j e c t . c o n s t r u c t o r = = " f u n c t i o n " & & ! i s P r o t o t y p e ( o b j e c t ) ? b a s e C r e a t e ( g e t P r o t o t y p e ( o b j e c t ) ) : { } } m o d u l e . e x p o r t s = i n i t C l o n e O b j e c t } , { " . / _ b a s e C r e a t e " : 8 1 , " . / _ g e t P r o t o t y p e " : 1 6 4 , " . / _ i s P r o t o t y p e " : 1 8 6 } ] , 1 8 0 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r S y m b o l = r e q u i r e ( " . / _ S y m b o l " ) , i s A r g u m e n t s = r e q u i r e ( " . / i s A r g u m e n t s " ) , i s A r r a y = r e q u i r e ( " . / i s A r r a y " ) ;
/** Built-in value references. */ var spreadableSymbol = Symbol ? Symbol . isConcatSpreadable : undefined ;
/ * *
* Checks if ` value ` is a flattenable ` arguments ` object or array .
*
* @ private
* @ param { * } value The value to check .
* @ returns { boolean } Returns ` true ` if ` value ` is flattenable , else ` false ` .
* / f u n c t i o n i s F l a t t e n a b l e ( v a l u e ) { r e t u r n i s A r r a y ( v a l u e ) | | i s A r g u m e n t s ( v a l u e ) | | ! ! ( s p r e a d a b l e S y m b o l & & v a l u e & & v a l u e [ s p r e a d a b l e S y m b o l ] ) } m o d u l e . e x p o r t s = i s F l a t t e n a b l e } , { " . / _ S y m b o l " : 6 0 , " . / i s A r g u m e n t s " : 2 4 2 , " . / i s A r r a y " : 2 4 3 } ] , 1 8 1 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) {
/** Used as references for various `Number` constants. */
var MAX _SAFE _INTEGER = 9007199254740991 ;
/** Used to detect unsigned integer values. */ var reIsUint = /^(?:0|[1-9]\d*)$/ ;
/ * *
* Checks if ` value ` is a valid array - like index .
*
* @ private
* @ param { * } value The value to check .
* @ param { number } [ length = MAX _SAFE _INTEGER ] The upper bounds of a valid index .
* @ returns { boolean } Returns ` true ` if ` value ` is a valid index , else ` false ` .
* / f u n c t i o n i s I n d e x ( v a l u e , l e n g t h ) { v a r t y p e = t y p e o f v a l u e ; l e n g t h = l e n g t h = = n u l l ? M A X _ S A F E _ I N T E G E R : l e n g t h ; r e t u r n ! ! l e n g t h & & ( t y p e = = " n u m b e r " | | t y p e ! = " s y m b o l " & & r e I s U i n t . t e s t ( v a l u e ) ) & & ( v a l u e > - 1 & & v a l u e % 1 = = 0 & & v a l u e < l e n g t h ) } m o d u l e . e x p o r t s = i s I n d e x } , { } ] , 1 8 2 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r e q = r e q u i r e ( " . / e q " ) , i s A r r a y L i k e = r e q u i r e ( " . / i s A r r a y L i k e " ) , i s I n d e x = r e q u i r e ( " . / _ i s I n d e x " ) , i s O b j e c t = r e q u i r e ( " . / i s O b j e c t " ) ;
/ * *
* Checks if the given arguments are from an iteratee call .
*
* @ private
* @ param { * } value The potential iteratee value argument .
* @ param { * } index The potential iteratee index or key argument .
* @ param { * } object The potential iteratee object argument .
* @ returns { boolean } Returns ` true ` if the arguments are from an iteratee call ,
* else ` false ` .
* / f u n c t i o n i s I t e r a t e e C a l l ( v a l u e , i n d e x , o b j e c t ) { i f ( ! i s O b j e c t ( o b j e c t ) ) { r e t u r n f a l s e } v a r t y p e = t y p e o f i n d e x ; i f ( t y p e = = " n u m b e r " ? i s A r r a y L i k e ( o b j e c t ) & & i s I n d e x ( i n d e x , o b j e c t . l e n g t h ) : t y p e = = " s t r i n g " & & i n d e x i n o b j e c t ) { r e t u r n e q ( o b j e c t [ i n d e x ] , v a l u e ) } r e t u r n f a l s e } m o d u l e . e x p o r t s = i s I t e r a t e e C a l l } , { " . / _ i s I n d e x " : 1 8 1 , " . / e q " : 2 3 1 , " . / i s A r r a y L i k e " : 2 4 4 , " . / i s O b j e c t " : 2 5 1 } ] , 1 8 3 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r i s A r r a y = r e q u i r e ( " . / i s A r r a y " ) , i s S y m b o l = r e q u i r e ( " . / i s S y m b o l " ) ;
/** Used to match property names within property paths. */ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/ , reIsPlainProp = /^\w*$/ ;
/ * *
* Checks if ` value ` is a property name and not a property path .
*
* @ private
* @ param { * } value The value to check .
* @ param { Object } [ object ] The object to query keys on .
* @ returns { boolean } Returns ` true ` if ` value ` is a property name , else ` false ` .
* / f u n c t i o n i s K e y ( v a l u e , o b j e c t ) { i f ( i s A r r a y ( v a l u e ) ) { r e t u r n f a l s e } v a r t y p e = t y p e o f v a l u e ; i f ( t y p e = = " n u m b e r " | | t y p e = = " s y m b o l " | | t y p e = = " b o o l e a n " | | v a l u e = = n u l l | | i s S y m b o l ( v a l u e ) ) { r e t u r n t r u e } r e t u r n r e I s P l a i n P r o p . t e s t ( v a l u e ) | | ! r e I s D e e p P r o p . t e s t ( v a l u e ) | | o b j e c t ! = n u l l & & v a l u e i n O b j e c t ( o b j e c t ) } m o d u l e . e x p o r t s = i s K e y } , { " . / i s A r r a y " : 2 4 3 , " . / i s S y m b o l " : 2 5 6 } ] , 1 8 4 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) {
/ * *
* Checks if ` value ` is suitable for use as unique object key .
*
* @ private
* @ param { * } value The value to check .
* @ returns { boolean } Returns ` true ` if ` value ` is suitable , else ` false ` .
* /
function isKeyable ( value ) { var type = typeof value ; return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null } module . exports = isKeyable } , { } ] , 185 : [ function ( require , module , exports ) { var coreJsData = require ( "./_coreJsData" ) ;
/** Used to detect methods masquerading as native. */ var maskSrcKey = function ( ) { var uid = /[^.]+$/ . exec ( coreJsData && coreJsData . keys && coreJsData . keys . IE _PROTO || "" ) ; return uid ? "Symbol(src)_1." + uid : "" } ( ) ;
/ * *
* Checks if ` func ` has its source masked .
*
* @ private
* @ param { Function } func The function to check .
* @ returns { boolean } Returns ` true ` if ` func ` is masked , else ` false ` .
* / f u n c t i o n i s M a s k e d ( f u n c ) { r e t u r n ! ! m a s k S r c K e y & & m a s k S r c K e y i n f u n c } m o d u l e . e x p o r t s = i s M a s k e d } , { " . / _ c o r e J s D a t a " : 1 4 6 } ] , 1 8 6 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) {
/** Used for built-in method references. */
var objectProto = Object . prototype ;
/ * *
* Checks if ` value ` is likely a prototype object .
*
* @ private
* @ param { * } value The value to check .
* @ returns { boolean } Returns ` true ` if ` value ` is a prototype , else ` false ` .
* / f u n c t i o n i s P r o t o t y p e ( v a l u e ) { v a r C t o r = v a l u e & & v a l u e . c o n s t r u c t o r , p r o t o = t y p e o f C t o r = = " f u n c t i o n " & & C t o r . p r o t o t y p e | | o b j e c t P r o t o ; r e t u r n v a l u e = = = p r o t o } m o d u l e . e x p o r t s = i s P r o t o t y p e } , { } ] , 1 8 7 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r i s O b j e c t = r e q u i r e ( " . / i s O b j e c t " ) ;
/ * *
* Checks if ` value ` is suitable for strict equality comparisons , i . e . ` === ` .
*
* @ private
* @ param { * } value The value to check .
* @ returns { boolean } Returns ` true ` if ` value ` if suitable for strict
* equality comparisons , else ` false ` .
* / f u n c t i o n i s S t r i c t C o m p a r a b l e ( v a l u e ) { r e t u r n v a l u e = = = v a l u e & & ! i s O b j e c t ( v a l u e ) } m o d u l e . e x p o r t s = i s S t r i c t C o m p a r a b l e } , { " . / i s O b j e c t " : 2 5 1 } ] , 1 8 8 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) {
/ * *
* Removes all key - value entries from the list cache .
*
* @ private
* @ name clear
* @ memberOf ListCache
* /
function listCacheClear ( ) { this . _ _data _ _ = [ ] ; this . size = 0 } module . exports = listCacheClear } , { } ] , 189 : [ function ( require , module , exports ) { var assocIndexOf = require ( "./_assocIndexOf" ) ;
/** Used for built-in method references. */ var arrayProto = Array . prototype ;
/** Built-in value references. */ var splice = arrayProto . splice ;
/ * *
* Removes ` key ` and its value from the list cache .
*
* @ private
* @ name delete
* @ memberOf ListCache
* @ param { string } key The key of the value to remove .
* @ returns { boolean } Returns ` true ` if the entry was removed , else ` false ` .
* / f u n c t i o n l i s t C a c h e D e l e t e ( k e y ) { v a r d a t a = t h i s . _ _ d a t a _ _ , i n d e x = a s s o c I n d e x O f ( d a t a , k e y ) ; i f ( i n d e x < 0 ) { r e t u r n f a l s e } v a r l a s t I n d e x = d a t a . l e n g t h - 1 ; i f ( i n d e x = = l a s t I n d e x ) { d a t a . p o p ( ) } e l s e { s p l i c e . c a l l ( d a t a , i n d e x , 1 ) } - - t h i s . s i z e ; r e t u r n t r u e } m o d u l e . e x p o r t s = l i s t C a c h e D e l e t e } , { " . / _ a s s o c I n d e x O f " : 7 6 } ] , 1 9 0 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r a s s o c I n d e x O f = r e q u i r e ( " . / _ a s s o c I n d e x O f " ) ;
/ * *
* Gets the list cache value for ` key ` .
*
* @ private
* @ name get
* @ memberOf ListCache
* @ param { string } key The key of the value to get .
* @ returns { * } Returns the entry value .
* / f u n c t i o n l i s t C a c h e G e t ( k e y ) { v a r d a t a = t h i s . _ _ d a t a _ _ , i n d e x = a s s o c I n d e x O f ( d a t a , k e y ) ; r e t u r n i n d e x < 0 ? u n d e f i n e d : d a t a [ i n d e x ] [ 1 ] } m o d u l e . e x p o r t s = l i s t C a c h e G e t } , { " . / _ a s s o c I n d e x O f " : 7 6 } ] , 1 9 1 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r a s s o c I n d e x O f = r e q u i r e ( " . / _ a s s o c I n d e x O f " ) ;
/ * *
* Checks if a list cache value for ` key ` exists .
*
* @ private
* @ name has
* @ memberOf ListCache
* @ param { string } key The key of the entry to check .
* @ returns { boolean } Returns ` true ` if an entry for ` key ` exists , else ` false ` .
* / f u n c t i o n l i s t C a c h e H a s ( k e y ) { r e t u r n a s s o c I n d e x O f ( t h i s . _ _ d a t a _ _ , k e y ) > - 1 } m o d u l e . e x p o r t s = l i s t C a c h e H a s } , { " . / _ a s s o c I n d e x O f " : 7 6 } ] , 1 9 2 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r a s s o c I n d e x O f = r e q u i r e ( " . / _ a s s o c I n d e x O f " ) ;
/ * *
* Sets the list cache ` key ` to ` value ` .
*
* @ private
* @ name set
* @ memberOf ListCache
* @ param { string } key The key of the value to set .
* @ param { * } value The value to set .
* @ returns { Object } Returns the list cache instance .
* / f u n c t i o n l i s t C a c h e S e t ( k e y , v a l u e ) { v a r d a t a = t h i s . _ _ d a t a _ _ , i n d e x = a s s o c I n d e x O f ( d a t a , k e y ) ; i f ( i n d e x < 0 ) { + + t h i s . s i z e ; d a t a . p u s h ( [ k e y , v a l u e ] ) } e l s e { d a t a [ i n d e x ] [ 1 ] = v a l u e } r e t u r n t h i s } m o d u l e . e x p o r t s = l i s t C a c h e S e t } , { " . / _ a s s o c I n d e x O f " : 7 6 } ] , 1 9 3 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r H a s h = r e q u i r e ( " . / _ H a s h " ) , L i s t C a c h e = r e q u i r e ( " . / _ L i s t C a c h e " ) , M a p = r e q u i r e ( " . / _ M a p " ) ;
/ * *
* Removes all key - value entries from the map .
*
* @ private
* @ name clear
* @ memberOf MapCache
* / f u n c t i o n m a p C a c h e C l e a r ( ) { t h i s . s i z e = 0 ; t h i s . _ _ d a t a _ _ = { h a s h : n e w H a s h , m a p : n e w ( M a p | | L i s t C a c h e ) , s t r i n g : n e w H a s h } } m o d u l e . e x p o r t s = m a p C a c h e C l e a r } , { " . / _ H a s h " : 5 2 , " . / _ L i s t C a c h e " : 5 3 , " . / _ M a p " : 5 4 } ] , 1 9 4 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r g e t M a p D a t a = r e q u i r e ( " . / _ g e t M a p D a t a " ) ;
/ * *
* Removes ` key ` and its value from the map .
*
* @ private
* @ name delete
* @ memberOf MapCache
* @ param { string } key The key of the value to remove .
* @ returns { boolean } Returns ` true ` if the entry was removed , else ` false ` .
* / f u n c t i o n m a p C a c h e D e l e t e ( k e y ) { v a r r e s u l t = g e t M a p D a t a ( t h i s , k e y ) [ " d e l e t e " ] ( k e y ) ; t h i s . s i z e - = r e s u l t ? 1 : 0 ; r e t u r n r e s u l t } m o d u l e . e x p o r t s = m a p C a c h e D e l e t e } , { " . / _ g e t M a p D a t a " : 1 6 1 } ] , 1 9 5 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r g e t M a p D a t a = r e q u i r e ( " . / _ g e t M a p D a t a " ) ;
/ * *
* Gets the map value for ` key ` .
*
* @ private
* @ name get
* @ memberOf MapCache
* @ param { string } key The key of the value to get .
* @ returns { * } Returns the entry value .
* / f u n c t i o n m a p C a c h e G e t ( k e y ) { r e t u r n g e t M a p D a t a ( t h i s , k e y ) . g e t ( k e y ) } m o d u l e . e x p o r t s = m a p C a c h e G e t } , { " . / _ g e t M a p D a t a " : 1 6 1 } ] , 1 9 6 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r g e t M a p D a t a = r e q u i r e ( " . / _ g e t M a p D a t a " ) ;
/ * *
* Checks if a map value for ` key ` exists .
*
* @ private
* @ name has
* @ memberOf MapCache
* @ param { string } key The key of the entry to check .
* @ returns { boolean } Returns ` true ` if an entry for ` key ` exists , else ` false ` .
* / f u n c t i o n m a p C a c h e H a s ( k e y ) { r e t u r n g e t M a p D a t a ( t h i s , k e y ) . h a s ( k e y ) } m o d u l e . e x p o r t s = m a p C a c h e H a s } , { " . / _ g e t M a p D a t a " : 1 6 1 } ] , 1 9 7 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r g e t M a p D a t a = r e q u i r e ( " . / _ g e t M a p D a t a " ) ;
/ * *
* Sets the map ` key ` to ` value ` .
*
* @ private
* @ name set
* @ memberOf MapCache
* @ param { string } key The key of the value to set .
* @ param { * } value The value to set .
* @ returns { Object } Returns the map cache instance .
* / f u n c t i o n m a p C a c h e S e t ( k e y , v a l u e ) { v a r d a t a = g e t M a p D a t a ( t h i s , k e y ) , s i z e = d a t a . s i z e ; d a t a . s e t ( k e y , v a l u e ) ; t h i s . s i z e + = d a t a . s i z e = = s i z e ? 0 : 1 ; r e t u r n t h i s } m o d u l e . e x p o r t s = m a p C a c h e S e t } , { " . / _ g e t M a p D a t a " : 1 6 1 } ] , 1 9 8 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) {
/ * *
* Converts ` map ` to its key - value pairs .
*
* @ private
* @ param { Object } map The map to convert .
* @ returns { Array } Returns the key - value pairs .
* /
function mapToArray ( map ) { var index = - 1 , result = Array ( map . size ) ; map . forEach ( function ( value , key ) { result [ ++ index ] = [ key , value ] } ) ; return result } module . exports = mapToArray } , { } ] , 199 : [ function ( require , module , exports ) {
/ * *
* A specialized version of ` matchesProperty ` for source values suitable
* for strict equality comparisons , i . e . ` === ` .
*
* @ private
* @ param { string } key The key of the property to get .
* @ param { * } srcValue The value to match .
* @ returns { Function } Returns the new spec function .
* /
function matchesStrictComparable ( key , srcValue ) { return function ( object ) { if ( object == null ) { return false } return object [ key ] === srcValue && ( srcValue !== undefined || key in Object ( object ) ) } } module . exports = matchesStrictComparable } , { } ] , 200 : [ function ( require , module , exports ) { var memoize = require ( "./memoize" ) ;
/** Used as the maximum memoize cache size. */ var MAX _MEMOIZE _SIZE = 500 ;
/ * *
* A specialized version of ` _.memoize ` which clears the memoized function ' s
* cache when it exceeds ` MAX_MEMOIZE_SIZE ` .
*
* @ private
* @ param { Function } func The function to have its output memoized .
* @ returns { Function } Returns the new memoized function .
* / f u n c t i o n m e m o i z e C a p p e d ( f u n c ) { v a r r e s u l t = m e m o i z e ( f u n c , f u n c t i o n ( k e y ) { i f ( c a c h e . s i z e = = = M A X _ M E M O I Z E _ S I Z E ) { c a c h e . c l e a r ( ) } r e t u r n k e y } ) ; v a r c a c h e = r e s u l t . c a c h e ; r e t u r n r e s u l t } m o d u l e . e x p o r t s = m e m o i z e C a p p e d } , { " . / m e m o i z e " : 2 6 5 } ] , 2 0 1 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r g e t N a t i v e = r e q u i r e ( " . / _ g e t N a t i v e " ) ;
/* Built-in method references that are verified to be native. */ var nativeCreate = getNative ( Object , "create" ) ; module . exports = nativeCreate } , { "./_getNative" : 163 } ] , 202 : [ function ( require , module , exports ) { var overArg = require ( "./_overArg" ) ;
/* Built-in method references for those with the same name as other `lodash` methods. */ var nativeKeys = overArg ( Object . keys , Object ) ; module . exports = nativeKeys } , { "./_overArg" : 206 } ] , 203 : [ function ( require , module , exports ) {
/ * *
* This function is like
* [ ` Object.keys ` ] ( http : //ecma-international.org/ecma-262/7.0/#sec-object.keys)
* except that it includes inherited enumerable properties .
*
* @ private
* @ param { Object } object The object to query .
* @ returns { Array } Returns the array of property names .
* /
function nativeKeysIn ( object ) { var result = [ ] ; if ( object != null ) { for ( var key in Object ( object ) ) { result . push ( key ) } } return result } module . exports = nativeKeysIn } , { } ] , 204 : [ function ( require , module , exports ) { var freeGlobal = require ( "./_freeGlobal" ) ;
/** Detect free variable `exports`. */ var freeExports = typeof exports == "object" && exports && ! exports . nodeType && exports ;
/** Detect free variable `module`. */ var freeModule = freeExports && typeof module == "object" && module && ! module . nodeType && module ;
/** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule . exports === freeExports ;
/** Detect free variable `process` from Node.js. */ var freeProcess = moduleExports && freeGlobal . process ;
/** Used to access faster Node.js helpers. */ var nodeUtil = function ( ) { try {
// Use `util.types` for Node.js 10+.
var types = freeModule && freeModule . require && freeModule . require ( "util" ) . types ; if ( types ) { return types }
// Legacy `process.binding('util')` for Node.js < 10.
return freeProcess && freeProcess . binding && freeProcess . binding ( "util" ) } catch ( e ) { } } ( ) ; module . exports = nodeUtil } , { "./_freeGlobal" : 158 } ] , 205 : [ function ( require , module , exports ) {
/** Used for built-in method references. */
var objectProto = Object . prototype ;
/ * *
* Used to resolve the
* [ ` toStringTag ` ] ( http : //ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
* of values .
* / v a r n a t i v e O b j e c t T o S t r i n g = o b j e c t P r o t o . t o S t r i n g ;
/ * *
* Converts ` value ` to a string using ` Object.prototype.toString ` .
*
* @ private
* @ param { * } value The value to convert .
* @ returns { string } Returns the converted string .
* / f u n c t i o n o b j e c t T o S t r i n g ( v a l u e ) { r e t u r n n a t i v e O b j e c t T o S t r i n g . c a l l ( v a l u e ) } m o d u l e . e x p o r t s = o b j e c t T o S t r i n g } , { } ] , 2 0 6 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) {
/ * *
* Creates a unary function that invokes ` func ` with its argument transformed .
*
* @ private
* @ param { Function } func The function to wrap .
* @ param { Function } transform The argument transform .
* @ returns { Function } Returns the new function .
* /
function overArg ( func , transform ) { return function ( arg ) { return func ( transform ( arg ) ) } } module . exports = overArg } , { } ] , 207 : [ function ( require , module , exports ) { var apply = require ( "./_apply" ) ;
/* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math . max ;
/ * *
* A specialized version of ` baseRest ` which transforms the rest array .
*
* @ private
* @ param { Function } func The function to apply a rest parameter to .
* @ param { number } [ start = func . length - 1 ] The start position of the rest parameter .
* @ param { Function } transform The rest array transform .
* @ returns { Function } Returns the new function .
* / f u n c t i o n o v e r R e s t ( f u n c , s t a r t , t r a n s f o r m ) { s t a r t = n a t i v e M a x ( s t a r t = = = u n d e f i n e d ? f u n c . l e n g t h - 1 : s t a r t , 0 ) ; r e t u r n f u n c t i o n ( ) { v a r a r g s = a r g u m e n t s , i n d e x = - 1 , l e n g t h = n a t i v e M a x ( a r g s . l e n g t h - s t a r t , 0 ) , a r r a y = A r r a y ( l e n g t h ) ; w h i l e ( + + i n d e x < l e n g t h ) { a r r a y [ i n d e x ] = a r g s [ s t a r t + i n d e x ] } i n d e x = - 1 ; v a r o t h e r A r g s = A r r a y ( s t a r t + 1 ) ; w h i l e ( + + i n d e x < s t a r t ) { o t h e r A r g s [ i n d e x ] = a r g s [ i n d e x ] } o t h e r A r g s [ s t a r t ] = t r a n s f o r m ( a r r a y ) ; r e t u r n a p p l y ( f u n c , t h i s , o t h e r A r g s ) } } m o d u l e . e x p o r t s = o v e r R e s t } , { " . / _ a p p l y " : 6 3 } ] , 2 0 8 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r f r e e G l o b a l = r e q u i r e ( " . / _ f r e e G l o b a l " ) ;
/** Detect free variable `self`. */ var freeSelf = typeof self == "object" && self && self . Object === Object && self ;
/** Used as a reference to the global object. */ var root = freeGlobal || freeSelf || Function ( "return this" ) ( ) ; module . exports = root } , { "./_freeGlobal" : 158 } ] , 209 : [ function ( require , module , exports ) {
/ * *
* Gets the value at ` key ` , unless ` key ` is "__proto__" or "constructor" .
*
* @ private
* @ param { Object } object The object to query .
* @ param { string } key The key of the property to get .
* @ returns { * } Returns the property value .
* /
function safeGet ( object , key ) { if ( key === "constructor" && typeof object [ key ] === "function" ) { return } if ( key == "__proto__" ) { return } return object [ key ] } module . exports = safeGet } , { } ] , 210 : [ function ( require , module , exports ) {
/** Used to stand-in for `undefined` hash values. */
var HASH _UNDEFINED = "__lodash_hash_undefined__" ;
/ * *
* Adds ` value ` to the array cache .
*
* @ private
* @ name add
* @ memberOf SetCache
* @ alias push
* @ param { * } value The value to cache .
* @ returns { Object } Returns the cache instance .
* / f u n c t i o n s e t C a c h e A d d ( v a l u e ) { t h i s . _ _ d a t a _ _ . s e t ( v a l u e , H A S H _ U N D E F I N E D ) ; r e t u r n t h i s } m o d u l e . e x p o r t s = s e t C a c h e A d d } , { } ] , 2 1 1 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) {
/ * *
* Checks if ` value ` is in the array cache .
*
* @ private
* @ name has
* @ memberOf SetCache
* @ param { * } value The value to search for .
* @ returns { number } Returns ` true ` if ` value ` is found , else ` false ` .
* /
function setCacheHas ( value ) { return this . _ _data _ _ . has ( value ) } module . exports = setCacheHas } , { } ] , 212 : [ function ( require , module , exports ) {
/ * *
* Converts ` set ` to an array of its values .
*
* @ private
* @ param { Object } set The set to convert .
* @ returns { Array } Returns the values .
* /
function setToArray ( set ) { var index = - 1 , result = Array ( set . size ) ; set . forEach ( function ( value ) { result [ ++ index ] = value } ) ; return result } module . exports = setToArray } , { } ] , 213 : [ function ( require , module , exports ) { var baseSetToString = require ( "./_baseSetToString" ) , shortOut = require ( "./_shortOut" ) ;
/ * *
* Sets the ` toString ` method of ` func ` to return ` string ` .
*
* @ private
* @ param { Function } func The function to modify .
* @ param { Function } string The ` toString ` result .
* @ returns { Function } Returns ` func ` .
* / v a r s e t T o S t r i n g = s h o r t O u t ( b a s e S e t T o S t r i n g ) ; m o d u l e . e x p o r t s = s e t T o S t r i n g } , { " . / _ b a s e S e t T o S t r i n g " : 1 2 3 , " . / _ s h o r t O u t " : 2 1 4 } ] , 2 1 4 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) {
/** Used to detect hot functions by number of calls within a span of milliseconds. */
var HOT _COUNT = 800 , HOT _SPAN = 16 ;
/* Built-in method references for those with the same name as other `lodash` methods. */ var nativeNow = Date . now ;
/ * *
* Creates a function that ' ll short out and invoke ` identity ` instead
* of ` func ` when it ' s called ` HOT_COUNT ` or more times in ` HOT_SPAN `
* milliseconds .
*
* @ private
* @ param { Function } func The function to restrict .
* @ returns { Function } Returns the new shortable function .
* / f u n c t i o n s h o r t O u t ( f u n c ) { v a r c o u n t = 0 , l a s t C a l l e d = 0 ; r e t u r n f u n c t i o n ( ) { v a r s t a m p = n a t i v e N o w ( ) , r e m a i n i n g = H O T _ S P A N - ( s t a m p - l a s t C a l l e d ) ; l a s t C a l l e d = s t a m p ; i f ( r e m a i n i n g > 0 ) { i f ( + + c o u n t > = H O T _ C O U N T ) { r e t u r n a r g u m e n t s [ 0 ] } } e l s e { c o u n t = 0 } r e t u r n f u n c . a p p l y ( u n d e f i n e d , a r g u m e n t s ) } } m o d u l e . e x p o r t s = s h o r t O u t } , { } ] , 2 1 5 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r L i s t C a c h e = r e q u i r e ( " . / _ L i s t C a c h e " ) ;
/ * *
* Removes all key - value entries from the stack .
*
* @ private
* @ name clear
* @ memberOf Stack
* / f u n c t i o n s t a c k C l e a r ( ) { t h i s . _ _ d a t a _ _ = n e w L i s t C a c h e ; t h i s . s i z e = 0 } m o d u l e . e x p o r t s = s t a c k C l e a r } , { " . / _ L i s t C a c h e " : 5 3 } ] , 2 1 6 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) {
/ * *
* Removes ` key ` and its value from the stack .
*
* @ private
* @ name delete
* @ memberOf Stack
* @ param { string } key The key of the value to remove .
* @ returns { boolean } Returns ` true ` if the entry was removed , else ` false ` .
* /
function stackDelete ( key ) { var data = this . _ _data _ _ , result = data [ "delete" ] ( key ) ; this . size = data . size ; return result } module . exports = stackDelete } , { } ] , 217 : [ function ( require , module , exports ) {
/ * *
* Gets the stack value for ` key ` .
*
* @ private
* @ name get
* @ memberOf Stack
* @ param { string } key The key of the value to get .
* @ returns { * } Returns the entry value .
* /
function stackGet ( key ) { return this . _ _data _ _ . get ( key ) } module . exports = stackGet } , { } ] , 218 : [ function ( require , module , exports ) {
/ * *
* Checks if a stack value for ` key ` exists .
*
* @ private
* @ name has
* @ memberOf Stack
* @ param { string } key The key of the entry to check .
* @ returns { boolean } Returns ` true ` if an entry for ` key ` exists , else ` false ` .
* /
function stackHas ( key ) { return this . _ _data _ _ . has ( key ) } module . exports = stackHas } , { } ] , 219 : [ function ( require , module , exports ) { var ListCache = require ( "./_ListCache" ) , Map = require ( "./_Map" ) , MapCache = require ( "./_MapCache" ) ;
/** Used as the size to enable large array optimizations. */ var LARGE _ARRAY _SIZE = 200 ;
/ * *
* Sets the stack ` key ` to ` value ` .
*
* @ private
* @ name set
* @ memberOf Stack
* @ param { string } key The key of the value to set .
* @ param { * } value The value to set .
* @ returns { Object } Returns the stack cache instance .
* / f u n c t i o n s t a c k S e t ( k e y , v a l u e ) { v a r d a t a = t h i s . _ _ d a t a _ _ ; i f ( d a t a i n s t a n c e o f L i s t C a c h e ) { v a r p a i r s = d a t a . _ _ d a t a _ _ ; i f ( ! M a p | | p a i r s . l e n g t h < L A R G E _ A R R A Y _ S I Z E - 1 ) { p a i r s . p u s h ( [ k e y , v a l u e ] ) ; t h i s . s i z e = + + d a t a . s i z e ; r e t u r n t h i s } d a t a = t h i s . _ _ d a t a _ _ = n e w M a p C a c h e ( p a i r s ) } d a t a . s e t ( k e y , v a l u e ) ; t h i s . s i z e = d a t a . s i z e ; r e t u r n t h i s } m o d u l e . e x p o r t s = s t a c k S e t } , { " . / _ L i s t C a c h e " : 5 3 , " . / _ M a p " : 5 4 , " . / _ M a p C a c h e " : 5 5 } ] , 2 2 0 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) {
/ * *
* A specialized version of ` _.indexOf ` which performs strict equality
* comparisons of values , i . e . ` === ` .
*
* @ private
* @ param { Array } array The array to inspect .
* @ param { * } value The value to search for .
* @ param { number } fromIndex The index to search from .
* @ returns { number } Returns the index of the matched value , else ` -1 ` .
* /
function strictIndexOf ( array , value , fromIndex ) { var index = fromIndex - 1 , length = array . length ; while ( ++ index < length ) { if ( array [ index ] === value ) { return index } } return - 1 } module . exports = strictIndexOf } , { } ] , 221 : [ function ( require , module , exports ) { var asciiSize = require ( "./_asciiSize" ) , hasUnicode = require ( "./_hasUnicode" ) , unicodeSize = require ( "./_unicodeSize" ) ;
/ * *
* Gets the number of symbols in ` string ` .
*
* @ private
* @ param { string } string The string to inspect .
* @ returns { number } Returns the string size .
* / f u n c t i o n s t r i n g S i z e ( s t r i n g ) { r e t u r n h a s U n i c o d e ( s t r i n g ) ? u n i c o d e S i z e ( s t r i n g ) : a s c i i S i z e ( s t r i n g ) } m o d u l e . e x p o r t s = s t r i n g S i z e } , { " . / _ a s c i i S i z e " : 7 3 , " . / _ h a s U n i c o d e " : 1 7 1 , " . / _ u n i c o d e S i z e " : 2 2 5 } ] , 2 2 2 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r m e m o i z e C a p p e d = r e q u i r e ( " . / _ m e m o i z e C a p p e d " ) ;
/** Used to match property names within property paths. */ var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g ;
/** Used to match backslashes in property paths. */ var reEscapeChar = /\\(\\)?/g ;
/ * *
* Converts ` string ` to a property path array .
*
* @ private
* @ param { string } string The string to convert .
* @ returns { Array } Returns the property path array .
* /var stringToPath=memoizeCapped(function(string){var result=[];if(string.charCodeAt(0)===46/ * . * / ) { r e s u l t . p u s h ( " " ) } s t r i n g . r e p l a c e ( r e P r o p N a m e , f u n c t i o n ( m a t c h , n u m b e r , q u o t e , s u b S t r i n g ) { r e s u l t . p u s h ( q u o t e ? s u b S t r i n g . r e p l a c e ( r e E s c a p e C h a r , " $ 1 " ) : n u m b e r | | m a t c h ) } ) ; r e t u r n r e s u l t } ) ; m o d u l e . e x p o r t s = s t r i n g T o P a t h } , { " . / _ m e m o i z e C a p p e d " : 2 0 0 } ] , 2 2 3 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r i s S y m b o l = r e q u i r e ( " . / i s S y m b o l " ) ;
/** Used as references for various `Number` constants. */ var INFINITY = 1 / 0 ;
/ * *
* Converts ` value ` to a string key if it ' s not a string or symbol .
*
* @ private
* @ param { * } value The value to inspect .
* @ returns { string | symbol } Returns the key .
* / f u n c t i o n t o K e y ( v a l u e ) { i f ( t y p e o f v a l u e = = " s t r i n g " | | i s S y m b o l ( v a l u e ) ) { r e t u r n v a l u e } v a r r e s u l t = v a l u e + " " ; r e t u r n r e s u l t = = " 0 " & & 1 / v a l u e = = - I N F I N I T Y ? " - 0 " : r e s u l t } m o d u l e . e x p o r t s = t o K e y } , { " . / i s S y m b o l " : 2 5 6 } ] , 2 2 4 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) {
/** Used for built-in method references. */
var funcProto = Function . prototype ;
/** Used to resolve the decompiled source of functions. */ var funcToString = funcProto . toString ;
/ * *
* Converts ` func ` to its source code .
*
* @ private
* @ param { Function } func The function to convert .
* @ returns { string } Returns the source code .
* / f u n c t i o n t o S o u r c e ( f u n c ) { i f ( f u n c ! = n u l l ) { t r y { r e t u r n f u n c T o S t r i n g . c a l l ( f u n c ) } c a t c h ( e ) { } t r y { r e t u r n f u n c + " " } c a t c h ( e ) { } } r e t u r n " " } m o d u l e . e x p o r t s = t o S o u r c e } , { } ] , 2 2 5 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) {
/** Used to compose unicode character classes. */
var rsAstralRange = "\\ud800-\\udfff" , rsComboMarksRange = "\\u0300-\\u036f" , reComboHalfMarksRange = "\\ufe20-\\ufe2f" , rsComboSymbolsRange = "\\u20d0-\\u20ff" , rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange , rsVarRange = "\\ufe0e\\ufe0f" ;
/** Used to compose unicode capture groups. */ var rsAstral = "[" + rsAstralRange + "]" , rsCombo = "[" + rsComboRange + "]" , rsFitz = "\\ud83c[\\udffb-\\udfff]" , rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")" , rsNonAstral = "[^" + rsAstralRange + "]" , rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}" , rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]" , rsZWJ = "\\u200d" ;
/** Used to compose unicode regexes. */ var reOptMod = rsModifier + "?" , rsOptVar = "[" + rsVarRange + "]?" , rsOptJoin = "(?:" + rsZWJ + "(?:" + [ rsNonAstral , rsRegional , rsSurrPair ] . join ( "|" ) + ")" + rsOptVar + reOptMod + ")*" , rsSeq = rsOptVar + reOptMod + rsOptJoin , rsSymbol = "(?:" + [ rsNonAstral + rsCombo + "?" , rsCombo , rsRegional , rsSurrPair , rsAstral ] . join ( "|" ) + ")" ;
/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ var reUnicode = RegExp ( rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq , "g" ) ;
/ * *
* Gets the size of a Unicode ` string ` .
*
* @ private
* @ param { string } string The string inspect .
* @ returns { number } Returns the string size .
* / f u n c t i o n u n i c o d e S i z e ( s t r i n g ) { v a r r e s u l t = r e U n i c o d e . l a s t I n d e x = 0 ; w h i l e ( r e U n i c o d e . t e s t ( s t r i n g ) ) { + + r e s u l t } r e t u r n r e s u l t } m o d u l e . e x p o r t s = u n i c o d e S i z e } , { } ] , 2 2 6 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r b a s e C l o n e = r e q u i r e ( " . / _ b a s e C l o n e " ) ;
/** Used to compose bitmasks for cloning. */ var CLONE _SYMBOLS _FLAG = 4 ;
/ * *
* Creates a shallow clone of ` value ` .
*
* * * Note : * * This method is loosely based on the
* [ structured clone algorithm ] ( https : //mdn.io/Structured_clone_algorithm)
* and supports cloning arrays , array buffers , booleans , date objects , maps ,
* numbers , ` Object ` objects , regexes , sets , strings , symbols , and typed
* arrays . The own enumerable properties of ` arguments ` objects are cloned
* as plain objects . An empty object is returned for uncloneable values such
* as error objects , functions , DOM nodes , and WeakMaps .
*
* @ static
* @ memberOf _
* @ since 0.1 . 0
* @ category Lang
* @ param { * } value The value to clone .
* @ returns { * } Returns the cloned value .
* @ see _ . cloneDeep
* @ example
*
* var objects = [ { 'a' : 1 } , { 'b' : 2 } ] ;
*
* var shallow = _ . clone ( objects ) ;
* console . log ( shallow [ 0 ] === objects [ 0 ] ) ;
* // => true
* / f u n c t i o n c l o n e ( v a l u e ) { r e t u r n b a s e C l o n e ( v a l u e , C L O N E _ S Y M B O L S _ F L A G ) } m o d u l e . e x p o r t s = c l o n e } , { " . / _ b a s e C l o n e " : 8 0 } ] , 2 2 7 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r b a s e C l o n e = r e q u i r e ( " . / _ b a s e C l o n e " ) ;
/** Used to compose bitmasks for cloning. */ var CLONE _DEEP _FLAG = 1 , CLONE _SYMBOLS _FLAG = 4 ;
/ * *
* This method is like ` _.clone ` except that it recursively clones ` value ` .
*
* @ static
* @ memberOf _
* @ since 1.0 . 0
* @ category Lang
* @ param { * } value The value to recursively clone .
* @ returns { * } Returns the deep cloned value .
* @ see _ . clone
* @ example
*
* var objects = [ { 'a' : 1 } , { 'b' : 2 } ] ;
*
* var deep = _ . cloneDeep ( objects ) ;
* console . log ( deep [ 0 ] === objects [ 0 ] ) ;
* // => false
* / f u n c t i o n c l o n e D e e p ( v a l u e ) { r e t u r n b a s e C l o n e ( v a l u e , C L O N E _ D E E P _ F L A G | C L O N E _ S Y M B O L S _ F L A G ) } m o d u l e . e x p o r t s = c l o n e D e e p } , { " . / _ b a s e C l o n e " : 8 0 } ] , 2 2 8 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) {
/ * *
* Creates a function that returns ` value ` .
*
* @ static
* @ memberOf _
* @ since 2.4 . 0
* @ category Util
* @ param { * } value The value to return from the new function .
* @ returns { Function } Returns the new constant function .
* @ example
*
* var objects = _ . times ( 2 , _ . constant ( { 'a' : 1 } ) ) ;
*
* console . log ( objects ) ;
* // => [{ 'a': 1 }, { 'a': 1 }]
*
* console . log ( objects [ 0 ] === objects [ 1 ] ) ;
* // => true
* /
function constant ( value ) { return function ( ) { return value } } module . exports = constant } , { } ] , 229 : [ function ( require , module , exports ) { var baseRest = require ( "./_baseRest" ) , eq = require ( "./eq" ) , isIterateeCall = require ( "./_isIterateeCall" ) , keysIn = require ( "./keysIn" ) ;
/** Used for built-in method references. */ var objectProto = Object . prototype ;
/** Used to check objects for own properties. */ var hasOwnProperty = objectProto . hasOwnProperty ;
/ * *
* Assigns own and inherited enumerable string keyed properties of source
* objects to the destination object for all destination properties that
* resolve to ` undefined ` . Source objects are applied from left to right .
* Once a property is set , additional values of the same property are ignored .
*
* * * Note : * * This method mutates ` object ` .
*
* @ static
* @ since 0.1 . 0
* @ memberOf _
* @ category Object
* @ param { Object } object The destination object .
* @ param { ... Object } [ sources ] The source objects .
* @ returns { Object } Returns ` object ` .
* @ see _ . defaultsDeep
* @ example
*
* _ . defaults ( { 'a' : 1 } , { 'b' : 2 } , { 'a' : 3 } ) ;
* // => { 'a': 1, 'b': 2 }
* / v a r d e f a u l t s = b a s e R e s t ( f u n c t i o n ( o b j e c t , s o u r c e s ) { o b j e c t = O b j e c t ( o b j e c t ) ; v a r i n d e x = - 1 ; v a r l e n g t h = s o u r c e s . l e n g t h ; v a r g u a r d = l e n g t h > 2 ? s o u r c e s [ 2 ] : u n d e f i n e d ; i f ( g u a r d & & i s I t e r a t e e C a l l ( s o u r c e s [ 0 ] , s o u r c e s [ 1 ] , g u a r d ) ) { l e n g t h = 1 } w h i l e ( + + i n d e x < l e n g t h ) { v a r s o u r c e = s o u r c e s [ i n d e x ] ; v a r p r o p s = k e y s I n ( s o u r c e ) ; v a r p r o p s I n d e x = - 1 ; v a r p r o p s L e n g t h = p r o p s . l e n g t h ; w h i l e ( + + p r o p s I n d e x < p r o p s L e n g t h ) { v a r k e y = p r o p s [ p r o p s I n d e x ] ; v a r v a l u e = o b j e c t [ k e y ] ; i f ( v a l u e = = = u n d e f i n e d | | e q ( v a l u e , o b j e c t P r o t o [ k e y ] ) & & ! h a s O w n P r o p e r t y . c a l l ( o b j e c t , k e y ) ) { o b j e c t [ k e y ] = s o u r c e [ k e y ] } } } r e t u r n o b j e c t } ) ; m o d u l e . e x p o r t s = d e f a u l t s } , { " . / _ b a s e R e s t " : 1 2 1 , " . / _ i s I t e r a t e e C a l l " : 1 8 2 , " . / e q " : 2 3 1 , " . / k e y s I n " : 2 6 0 } ] , 2 3 0 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { m o d u l e . e x p o r t s = r e q u i r e ( " . / f o r E a c h " ) } , { " . / f o r E a c h " : 2 3 6 } ] , 2 3 1 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) {
/ * *
* Performs a
* [ ` SameValueZero ` ] ( http : //ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* comparison between two values to determine if they are equivalent .
*
* @ static
* @ memberOf _
* @ since 4.0 . 0
* @ category Lang
* @ param { * } value The value to compare .
* @ param { * } other The other value to compare .
* @ returns { boolean } Returns ` true ` if the values are equivalent , else ` false ` .
* @ example
*
* var object = { 'a' : 1 } ;
* var other = { 'a' : 1 } ;
*
* _ . eq ( object , object ) ;
* // => true
*
* _ . eq ( object , other ) ;
* // => false
*
* _ . eq ( 'a' , 'a' ) ;
* // => true
*
* _ . eq ( 'a' , Object ( 'a' ) ) ;
* // => false
*
* _ . eq ( NaN , NaN ) ;
* // => true
* /
function eq ( value , other ) { return value === other || value !== value && other !== other } module . exports = eq } , { } ] , 232 : [ function ( require , module , exports ) { var arrayFilter = require ( "./_arrayFilter" ) , baseFilter = require ( "./_baseFilter" ) , baseIteratee = require ( "./_baseIteratee" ) , isArray = require ( "./isArray" ) ;
/ * *
* Iterates over elements of ` collection ` , returning an array of all elements
* ` predicate ` returns truthy for . The predicate is invoked with three
* arguments : ( value , index | key , collection ) .
*
* * * Note : * * Unlike ` _.remove ` , this method returns a new array .
*
* @ static
* @ memberOf _
* @ since 0.1 . 0
* @ category Collection
* @ param { Array | Object } collection The collection to iterate over .
* @ param { Function } [ predicate = _ . identity ] The function invoked per iteration .
* @ returns { Array } Returns the new filtered array .
* @ see _ . reject
* @ example
*
* var users = [
* { 'user' : 'barney' , 'age' : 36 , 'active' : true } ,
* { 'user' : 'fred' , 'age' : 40 , 'active' : false }
* ] ;
*
* _ . filter ( users , function ( o ) { return ! o . active ; } ) ;
* // => objects for ['fred']
*
* // The `_.matches` iteratee shorthand.
* _ . filter ( users , { 'age' : 36 , 'active' : true } ) ;
* // => objects for ['barney']
*
* // The `_.matchesProperty` iteratee shorthand.
* _ . filter ( users , [ 'active' , false ] ) ;
* // => objects for ['fred']
*
* // The `_.property` iteratee shorthand.
* _ . filter ( users , 'active' ) ;
* // => objects for ['barney']
* / f u n c t i o n f i l t e r ( c o l l e c t i o n , p r e d i c a t e ) { v a r f u n c = i s A r r a y ( c o l l e c t i o n ) ? a r r a y F i l t e r : b a s e F i l t e r ; r e t u r n f u n c ( c o l l e c t i o n , b a s e I t e r a t e e ( p r e d i c a t e , 3 ) ) } m o d u l e . e x p o r t s = f i l t e r } , { " . / _ a r r a y F i l t e r " : 6 5 , " . / _ b a s e F i l t e r " : 8 4 , " . / _ b a s e I t e r a t e e " : 1 0 5 , " . / i s A r r a y " : 2 4 3 } ] , 2 3 3 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r c r e a t e F i n d = r e q u i r e ( " . / _ c r e a t e F i n d " ) , f i n d I n d e x = r e q u i r e ( " . / f i n d I n d e x " ) ;
/ * *
* Iterates over elements of ` collection ` , returning the first element
* ` predicate ` returns truthy for . The predicate is invoked with three
* arguments : ( value , index | key , collection ) .
*
* @ static
* @ memberOf _
* @ since 0.1 . 0
* @ category Collection
* @ param { Array | Object } collection The collection to inspect .
* @ param { Function } [ predicate = _ . identity ] The function invoked per iteration .
* @ param { number } [ fromIndex = 0 ] The index to search from .
* @ returns { * } Returns the matched element , else ` undefined ` .
* @ example
*
* var users = [
* { 'user' : 'barney' , 'age' : 36 , 'active' : true } ,
* { 'user' : 'fred' , 'age' : 40 , 'active' : false } ,
* { 'user' : 'pebbles' , 'age' : 1 , 'active' : true }
* ] ;
*
* _ . find ( users , function ( o ) { return o . age < 40 ; } ) ;
* // => object for 'barney'
*
* // The `_.matches` iteratee shorthand.
* _ . find ( users , { 'age' : 1 , 'active' : true } ) ;
* // => object for 'pebbles'
*
* // The `_.matchesProperty` iteratee shorthand.
* _ . find ( users , [ 'active' , false ] ) ;
* // => object for 'fred'
*
* // The `_.property` iteratee shorthand.
* _ . find ( users , 'active' ) ;
* // => object for 'barney'
* / v a r f i n d = c r e a t e F i n d ( f i n d I n d e x ) ; m o d u l e . e x p o r t s = f i n d } , { " . / _ c r e a t e F i n d " : 1 5 0 , " . / f i n d I n d e x " : 2 3 4 } ] , 2 3 4 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r b a s e F i n d I n d e x = r e q u i r e ( " . / _ b a s e F i n d I n d e x " ) , b a s e I t e r a t e e = r e q u i r e ( " . / _ b a s e I t e r a t e e " ) , t o I n t e g e r = r e q u i r e ( " . / t o I n t e g e r " ) ;
/* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math . max ;
/ * *
* This method is like ` _.find ` except that it returns the index of the first
* element ` predicate ` returns truthy for instead of the element itself .
*
* @ static
* @ memberOf _
* @ since 1.1 . 0
* @ category Array
* @ param { Array } array The array to inspect .
* @ param { Function } [ predicate = _ . identity ] The function invoked per iteration .
* @ param { number } [ fromIndex = 0 ] The index to search from .
* @ returns { number } Returns the index of the found element , else ` -1 ` .
* @ example
*
* var users = [
* { 'user' : 'barney' , 'active' : false } ,
* { 'user' : 'fred' , 'active' : false } ,
* { 'user' : 'pebbles' , 'active' : true }
* ] ;
*
* _ . findIndex ( users , function ( o ) { return o . user == 'barney' ; } ) ;
* // => 0
*
* // The `_.matches` iteratee shorthand.
* _ . findIndex ( users , { 'user' : 'fred' , 'active' : false } ) ;
* // => 1
*
* // The `_.matchesProperty` iteratee shorthand.
* _ . findIndex ( users , [ 'active' , false ] ) ;
* // => 0
*
* // The `_.property` iteratee shorthand.
* _ . findIndex ( users , 'active' ) ;
* // => 2
* / f u n c t i o n f i n d I n d e x ( a r r a y , p r e d i c a t e , f r o m I n d e x ) { v a r l e n g t h = a r r a y = = n u l l ? 0 : a r r a y . l e n g t h ; i f ( ! l e n g t h ) { r e t u r n - 1 } v a r i n d e x = f r o m I n d e x = = n u l l ? 0 : t o I n t e g e r ( f r o m I n d e x ) ; i f ( i n d e x < 0 ) { i n d e x = n a t i v e M a x ( l e n g t h + i n d e x , 0 ) } r e t u r n b a s e F i n d I n d e x ( a r r a y , b a s e I t e r a t e e ( p r e d i c a t e , 3 ) , i n d e x ) } m o d u l e . e x p o r t s = f i n d I n d e x } , { " . / _ b a s e F i n d I n d e x " : 8 5 , " . / _ b a s e I t e r a t e e " : 1 0 5 , " . / t o I n t e g e r " : 2 8 0 } ] , 2 3 5 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r b a s e F l a t t e n = r e q u i r e ( " . / _ b a s e F l a t t e n " ) ;
/ * *
* Flattens ` array ` a single level deep .
*
* @ static
* @ memberOf _
* @ since 0.1 . 0
* @ category Array
* @ param { Array } array The array to flatten .
* @ returns { Array } Returns the new flattened array .
* @ example
*
* _ . flatten ( [ 1 , [ 2 , [ 3 , [ 4 ] ] , 5 ] ] ) ;
* // => [1, 2, [3, [4]], 5]
* / f u n c t i o n f l a t t e n ( a r r a y ) { v a r l e n g t h = a r r a y = = n u l l ? 0 : a r r a y . l e n g t h ; r e t u r n l e n g t h ? b a s e F l a t t e n ( a r r a y , 1 ) : [ ] } m o d u l e . e x p o r t s = f l a t t e n } , { " . / _ b a s e F l a t t e n " : 8 6 } ] , 2 3 6 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r a r r a y E a c h = r e q u i r e ( " . / _ a r r a y E a c h " ) , b a s e E a c h = r e q u i r e ( " . / _ b a s e E a c h " ) , c a s t F u n c t i o n = r e q u i r e ( " . / _ c a s t F u n c t i o n " ) , i s A r r a y = r e q u i r e ( " . / i s A r r a y " ) ;
/ * *
* Iterates over elements of ` collection ` and invokes ` iteratee ` for each element .
* The iteratee is invoked with three arguments : ( value , index | key , collection ) .
* Iteratee functions may exit iteration early by explicitly returning ` false ` .
*
* * * Note : * * As with other "Collections" methods , objects with a "length"
* property are iterated like arrays . To avoid this behavior use ` _.forIn `
* or ` _.forOwn ` for object iteration .
*
* @ static
* @ memberOf _
* @ since 0.1 . 0
* @ alias each
* @ category Collection
* @ param { Array | Object } collection The collection to iterate over .
* @ param { Function } [ iteratee = _ . identity ] The function invoked per iteration .
* @ returns { Array | Object } Returns ` collection ` .
* @ see _ . forEachRight
* @ example
*
* _ . forEach ( [ 1 , 2 ] , function ( value ) {
* console . log ( value ) ;
* } ) ;
* // => Logs `1` then `2`.
*
* _ . forEach ( { 'a' : 1 , 'b' : 2 } , function ( value , key ) {
* console . log ( key ) ;
* } ) ;
* // => Logs 'a' then 'b' (iteration order is not guaranteed).
* / f u n c t i o n f o r E a c h ( c o l l e c t i o n , i t e r a t e e ) { v a r f u n c = i s A r r a y ( c o l l e c t i o n ) ? a r r a y E a c h : b a s e E a c h ; r e t u r n f u n c ( c o l l e c t i o n , c a s t F u n c t i o n ( i t e r a t e e ) ) } m o d u l e . e x p o r t s = f o r E a c h } , { " . / _ a r r a y E a c h " : 6 4 , " . / _ b a s e E a c h " : 8 2 , " . / _ c a s t F u n c t i o n " : 1 3 2 , " . / i s A r r a y " : 2 4 3 } ] , 2 3 7 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r b a s e F o r = r e q u i r e ( " . / _ b a s e F o r " ) , c a s t F u n c t i o n = r e q u i r e ( " . / _ c a s t F u n c t i o n " ) , k e y s I n = r e q u i r e ( " . / k e y s I n " ) ;
/ * *
* Iterates over own and inherited enumerable string keyed properties of an
* object and invokes ` iteratee ` for each property . The iteratee is invoked
* with three arguments : ( value , key , object ) . Iteratee functions may exit
* iteration early by explicitly returning ` false ` .
*
* @ static
* @ memberOf _
* @ since 0.3 . 0
* @ category Object
* @ param { Object } object The object to iterate over .
* @ param { Function } [ iteratee = _ . identity ] The function invoked per iteration .
* @ returns { Object } Returns ` object ` .
* @ see _ . forInRight
* @ example
*
* function Foo ( ) {
* this . a = 1 ;
* this . b = 2 ;
* }
*
* Foo . prototype . c = 3 ;
*
* _ . forIn ( new Foo , function ( value , key ) {
* console . log ( key ) ;
* } ) ;
* // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
* / f u n c t i o n f o r I n ( o b j e c t , i t e r a t e e ) { r e t u r n o b j e c t = = n u l l ? o b j e c t : b a s e F o r ( o b j e c t , c a s t F u n c t i o n ( i t e r a t e e ) , k e y s I n ) } m o d u l e . e x p o r t s = f o r I n } , { " . / _ b a s e F o r " : 8 7 , " . / _ c a s t F u n c t i o n " : 1 3 2 , " . / k e y s I n " : 2 6 0 } ] , 2 3 8 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r b a s e G e t = r e q u i r e ( " . / _ b a s e G e t " ) ;
/ * *
* Gets the value at ` path ` of ` object ` . If the resolved value is
* ` undefined ` , the ` defaultValue ` is returned in its place .
*
* @ static
* @ memberOf _
* @ since 3.7 . 0
* @ category Object
* @ param { Object } object The object to query .
* @ param { Array | string } path The path of the property to get .
* @ param { * } [ defaultValue ] The value returned for ` undefined ` resolved values .
* @ returns { * } Returns the resolved value .
* @ example
*
* var object = { 'a' : [ { 'b' : { 'c' : 3 } } ] } ;
*
* _ . get ( object , 'a[0].b.c' ) ;
* // => 3
*
* _ . get ( object , [ 'a' , '0' , 'b' , 'c' ] ) ;
* // => 3
*
* _ . get ( object , 'a.b.c' , 'default' ) ;
* // => 'default'
* / f u n c t i o n g e t ( o b j e c t , p a t h , d e f a u l t V a l u e ) { v a r r e s u l t = o b j e c t = = n u l l ? u n d e f i n e d : b a s e G e t ( o b j e c t , p a t h ) ; r e t u r n r e s u l t = = = u n d e f i n e d ? d e f a u l t V a l u e : r e s u l t } m o d u l e . e x p o r t s = g e t } , { " . / _ b a s e G e t " : 8 9 } ] , 2 3 9 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r b a s e H a s = r e q u i r e ( " . / _ b a s e H a s " ) , h a s P a t h = r e q u i r e ( " . / _ h a s P a t h " ) ;
/ * *
* Checks if ` path ` is a direct property of ` object ` .
*
* @ static
* @ since 0.1 . 0
* @ memberOf _
* @ category Object
* @ param { Object } object The object to query .
* @ param { Array | string } path The path to check .
* @ returns { boolean } Returns ` true ` if ` path ` exists , else ` false ` .
* @ example
*
* var object = { 'a' : { 'b' : 2 } } ;
* var other = _ . create ( { 'a' : _ . create ( { 'b' : 2 } ) } ) ;
*
* _ . has ( object , 'a' ) ;
* // => true
*
* _ . has ( object , 'a.b' ) ;
* // => true
*
* _ . has ( object , [ 'a' , 'b' ] ) ;
* // => true
*
* _ . has ( other , 'a' ) ;
* // => false
* / f u n c t i o n h a s ( o b j e c t , p a t h ) { r e t u r n o b j e c t ! = n u l l & & h a s P a t h ( o b j e c t , p a t h , b a s e H a s ) } m o d u l e . e x p o r t s = h a s } , { " . / _ b a s e H a s " : 9 3 , " . / _ h a s P a t h " : 1 7 0 } ] , 2 4 0 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r b a s e H a s I n = r e q u i r e ( " . / _ b a s e H a s I n " ) , h a s P a t h = r e q u i r e ( " . / _ h a s P a t h " ) ;
/ * *
* Checks if ` path ` is a direct or inherited property of ` object ` .
*
* @ static
* @ memberOf _
* @ since 4.0 . 0
* @ category Object
* @ param { Object } object The object to query .
* @ param { Array | string } path The path to check .
* @ returns { boolean } Returns ` true ` if ` path ` exists , else ` false ` .
* @ example
*
* var object = _ . create ( { 'a' : _ . create ( { 'b' : 2 } ) } ) ;
*
* _ . hasIn ( object , 'a' ) ;
* // => true
*
* _ . hasIn ( object , 'a.b' ) ;
* // => true
*
* _ . hasIn ( object , [ 'a' , 'b' ] ) ;
* // => true
*
* _ . hasIn ( object , 'b' ) ;
* // => false
* / f u n c t i o n h a s I n ( o b j e c t , p a t h ) { r e t u r n o b j e c t ! = n u l l & & h a s P a t h ( o b j e c t , p a t h , b a s e H a s I n ) } m o d u l e . e x p o r t s = h a s I n } , { " . / _ b a s e H a s I n " : 9 4 , " . / _ h a s P a t h " : 1 7 0 } ] , 2 4 1 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) {
/ * *
* This method returns the first argument it receives .
*
* @ static
* @ since 0.1 . 0
* @ memberOf _
* @ category Util
* @ param { * } value Any value .
* @ returns { * } Returns ` value ` .
* @ example
*
* var object = { 'a' : 1 } ;
*
* console . log ( _ . identity ( object ) === object ) ;
* // => true
* /
function identity ( value ) { return value } module . exports = identity } , { } ] , 242 : [ function ( require , module , exports ) { var baseIsArguments = require ( "./_baseIsArguments" ) , isObjectLike = require ( "./isObjectLike" ) ;
/** Used for built-in method references. */ var objectProto = Object . prototype ;
/** Used to check objects for own properties. */ var hasOwnProperty = objectProto . hasOwnProperty ;
/** Built-in value references. */ var propertyIsEnumerable = objectProto . propertyIsEnumerable ;
/ * *
* Checks if ` value ` is likely an ` arguments ` object .
*
* @ static
* @ memberOf _
* @ since 0.1 . 0
* @ category Lang
* @ param { * } value The value to check .
* @ returns { boolean } Returns ` true ` if ` value ` is an ` arguments ` object ,
* else ` false ` .
* @ example
*
* _ . isArguments ( function ( ) { return arguments ; } ( ) ) ;
* // => true
*
* _ . isArguments ( [ 1 , 2 , 3 ] ) ;
* // => false
* / v a r i s A r g u m e n t s = b a s e I s A r g u m e n t s ( f u n c t i o n ( ) { r e t u r n a r g u m e n t s } ( ) ) ? b a s e I s A r g u m e n t s : f u n c t i o n ( v a l u e ) { r e t u r n i s O b j e c t L i k e ( v a l u e ) & & h a s O w n P r o p e r t y . c a l l ( v a l u e , " c a l l e e " ) & & ! p r o p e r t y I s E n u m e r a b l e . c a l l ( v a l u e , " c a l l e e " ) } ; m o d u l e . e x p o r t s = i s A r g u m e n t s } , { " . / _ b a s e I s A r g u m e n t s " : 9 6 , " . / i s O b j e c t L i k e " : 2 5 2 } ] , 2 4 3 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) {
/ * *
* Checks if ` value ` is classified as an ` Array ` object .
*
* @ static
* @ memberOf _
* @ since 0.1 . 0
* @ category Lang
* @ param { * } value The value to check .
* @ returns { boolean } Returns ` true ` if ` value ` is an array , else ` false ` .
* @ example
*
* _ . isArray ( [ 1 , 2 , 3 ] ) ;
* // => true
*
* _ . isArray ( document . body . children ) ;
* // => false
*
* _ . isArray ( 'abc' ) ;
* // => false
*
* _ . isArray ( _ . noop ) ;
* // => false
* /
var isArray = Array . isArray ; module . exports = isArray } , { } ] , 244 : [ function ( require , module , exports ) { var isFunction = require ( "./isFunction" ) , isLength = require ( "./isLength" ) ;
/ * *
* Checks if ` value ` is array - like . A value is considered array - like if it ' s
* not a function and has a ` value.length ` that ' s an integer greater than or
* equal to ` 0 ` and less than or equal to ` Number.MAX_SAFE_INTEGER ` .
*
* @ static
* @ memberOf _
* @ since 4.0 . 0
* @ category Lang
* @ param { * } value The value to check .
* @ returns { boolean } Returns ` true ` if ` value ` is array - like , else ` false ` .
* @ example
*
* _ . isArrayLike ( [ 1 , 2 , 3 ] ) ;
* // => true
*
* _ . isArrayLike ( document . body . children ) ;
* // => true
*
* _ . isArrayLike ( 'abc' ) ;
* // => true
*
* _ . isArrayLike ( _ . noop ) ;
* // => false
* / f u n c t i o n i s A r r a y L i k e ( v a l u e ) { r e t u r n v a l u e ! = n u l l & & i s L e n g t h ( v a l u e . l e n g t h ) & & ! i s F u n c t i o n ( v a l u e ) } m o d u l e . e x p o r t s = i s A r r a y L i k e } , { " . / i s F u n c t i o n " : 2 4 8 , " . / i s L e n g t h " : 2 4 9 } ] , 2 4 5 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r i s A r r a y L i k e = r e q u i r e ( " . / i s A r r a y L i k e " ) , i s O b j e c t L i k e = r e q u i r e ( " . / i s O b j e c t L i k e " ) ;
/ * *
* This method is like ` _.isArrayLike ` except that it also checks if ` value `
* is an object .
*
* @ static
* @ memberOf _
* @ since 4.0 . 0
* @ category Lang
* @ param { * } value The value to check .
* @ returns { boolean } Returns ` true ` if ` value ` is an array - like object ,
* else ` false ` .
* @ example
*
* _ . isArrayLikeObject ( [ 1 , 2 , 3 ] ) ;
* // => true
*
* _ . isArrayLikeObject ( document . body . children ) ;
* // => true
*
* _ . isArrayLikeObject ( 'abc' ) ;
* // => false
*
* _ . isArrayLikeObject ( _ . noop ) ;
* // => false
* / f u n c t i o n i s A r r a y L i k e O b j e c t ( v a l u e ) { r e t u r n i s O b j e c t L i k e ( v a l u e ) & & i s A r r a y L i k e ( v a l u e ) } m o d u l e . e x p o r t s = i s A r r a y L i k e O b j e c t } , { " . / i s A r r a y L i k e " : 2 4 4 , " . / i s O b j e c t L i k e " : 2 5 2 } ] , 2 4 6 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r r o o t = r e q u i r e ( " . / _ r o o t " ) , s t u b F a l s e = r e q u i r e ( " . / s t u b F a l s e " ) ;
/** Detect free variable `exports`. */ var freeExports = typeof exports == "object" && exports && ! exports . nodeType && exports ;
/** Detect free variable `module`. */ var freeModule = freeExports && typeof module == "object" && module && ! module . nodeType && module ;
/** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule . exports === freeExports ;
/** Built-in value references. */ var Buffer = moduleExports ? root . Buffer : undefined ;
/* Built-in method references for those with the same name as other `lodash` methods. */ var nativeIsBuffer = Buffer ? Buffer . isBuffer : undefined ;
/ * *
* Checks if ` value ` is a buffer .
*
* @ static
* @ memberOf _
* @ since 4.3 . 0
* @ category Lang
* @ param { * } value The value to check .
* @ returns { boolean } Returns ` true ` if ` value ` is a buffer , else ` false ` .
* @ example
*
* _ . isBuffer ( new Buffer ( 2 ) ) ;
* // => true
*
* _ . isBuffer ( new Uint8Array ( 2 ) ) ;
* // => false
* / v a r i s B u f f e r = n a t i v e I s B u f f e r | | s t u b F a l s e ; m o d u l e . e x p o r t s = i s B u f f e r } , { " . / _ r o o t " : 2 0 8 , " . / s t u b F a l s e " : 2 7 8 } ] , 2 4 7 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r b a s e K e y s = r e q u i r e ( " . / _ b a s e K e y s " ) , g e t T a g = r e q u i r e ( " . / _ g e t T a g " ) , i s A r g u m e n t s = r e q u i r e ( " . / i s A r g u m e n t s " ) , i s A r r a y = r e q u i r e ( " . / i s A r r a y " ) , i s A r r a y L i k e = r e q u i r e ( " . / i s A r r a y L i k e " ) , i s B u f f e r = r e q u i r e ( " . / i s B u f f e r " ) , i s P r o t o t y p e = r e q u i r e ( " . / _ i s P r o t o t y p e " ) , i s T y p e d A r r a y = r e q u i r e ( " . / i s T y p e d A r r a y " ) ;
/** `Object#toString` result references. */ var mapTag = "[object Map]" , setTag = "[object Set]" ;
/** Used for built-in method references. */ var objectProto = Object . prototype ;
/** Used to check objects for own properties. */ var hasOwnProperty = objectProto . hasOwnProperty ;
/ * *
* Checks if ` value ` is an empty object , collection , map , or set .
*
* Objects are considered empty if they have no own enumerable string keyed
* properties .
*
* Array - like values such as ` arguments ` objects , arrays , buffers , strings , or
* jQuery - like collections are considered empty if they have a ` length ` of ` 0 ` .
* Similarly , maps and sets are considered empty if they have a ` size ` of ` 0 ` .
*
* @ static
* @ memberOf _
* @ since 0.1 . 0
* @ category Lang
* @ param { * } value The value to check .
* @ returns { boolean } Returns ` true ` if ` value ` is empty , else ` false ` .
* @ example
*
* _ . isEmpty ( null ) ;
* // => true
*
* _ . isEmpty ( true ) ;
* // => true
*
* _ . isEmpty ( 1 ) ;
* // => true
*
* _ . isEmpty ( [ 1 , 2 , 3 ] ) ;
* // => false
*
* _ . isEmpty ( { 'a' : 1 } ) ;
* // => false
* / f u n c t i o n i s E m p t y ( v a l u e ) { i f ( v a l u e = = n u l l ) { r e t u r n t r u e } i f ( i s A r r a y L i k e ( v a l u e ) & & ( i s A r r a y ( v a l u e ) | | t y p e o f v a l u e = = " s t r i n g " | | t y p e o f v a l u e . s p l i c e = = " f u n c t i o n " | | i s B u f f e r ( v a l u e ) | | i s T y p e d A r r a y ( v a l u e ) | | i s A r g u m e n t s ( v a l u e ) ) ) { r e t u r n ! v a l u e . l e n g t h } v a r t a g = g e t T a g ( v a l u e ) ; i f ( t a g = = m a p T a g | | t a g = = s e t T a g ) { r e t u r n ! v a l u e . s i z e } i f ( i s P r o t o t y p e ( v a l u e ) ) { r e t u r n ! b a s e K e y s ( v a l u e ) . l e n g t h } f o r ( v a r k e y i n v a l u e ) { i f ( h a s O w n P r o p e r t y . c a l l ( v a l u e , k e y ) ) { r e t u r n f a l s e } } r e t u r n t r u e } m o d u l e . e x p o r t s = i s E m p t y } , { " . / _ b a s e K e y s " : 1 0 6 , " . / _ g e t T a g " : 1 6 8 , " . / _ i s P r o t o t y p e " : 1 8 6 , " . / i s A r g u m e n t s " : 2 4 2 , " . / i s A r r a y " : 2 4 3 , " . / i s A r r a y L i k e " : 2 4 4 , " . / i s B u f f e r " : 2 4 6 , " . / i s T y p e d A r r a y " : 2 5 7 } ] , 2 4 8 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r b a s e G e t T a g = r e q u i r e ( " . / _ b a s e G e t T a g " ) , i s O b j e c t = r e q u i r e ( " . / i s O b j e c t " ) ;
/** `Object#toString` result references. */ var asyncTag = "[object AsyncFunction]" , funcTag = "[object Function]" , genTag = "[object GeneratorFunction]" , proxyTag = "[object Proxy]" ;
/ * *
* Checks if ` value ` is classified as a ` Function ` object .
*
* @ static
* @ memberOf _
* @ since 0.1 . 0
* @ category Lang
* @ param { * } value The value to check .
* @ returns { boolean } Returns ` true ` if ` value ` is a function , else ` false ` .
* @ example
*
* _ . isFunction ( _ ) ;
* // => true
*
* _ . isFunction ( /abc/ ) ;
* // => false
* / f u n c t i o n i s F u n c t i o n ( v a l u e ) { i f ( ! i s O b j e c t ( v a l u e ) ) { r e t u r n f a l s e }
// The use of `Object#toString` avoids issues with the `typeof` operator
// in Safari 9 which returns 'object' for typed arrays and other constructors.
var tag = baseGetTag ( value ) ; return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag } module . exports = isFunction } , { "./_baseGetTag" : 91 , "./isObject" : 251 } ] , 249 : [ function ( require , module , exports ) {
/** Used as references for various `Number` constants. */
var MAX _SAFE _INTEGER = 9007199254740991 ;
/ * *
* Checks if ` value ` is a valid array - like length .
*
* * * Note : * * This method is loosely based on
* [ ` ToLength ` ] ( http : //ecma-international.org/ecma-262/7.0/#sec-tolength).
*
* @ static
* @ memberOf _
* @ since 4.0 . 0
* @ category Lang
* @ param { * } value The value to check .
* @ returns { boolean } Returns ` true ` if ` value ` is a valid length , else ` false ` .
* @ example
*
* _ . isLength ( 3 ) ;
* // => true
*
* _ . isLength ( Number . MIN _VALUE ) ;
* // => false
*
* _ . isLength ( Infinity ) ;
* // => false
*
* _ . isLength ( '3' ) ;
* // => false
* / f u n c t i o n i s L e n g t h ( v a l u e ) { r e t u r n t y p e o f v a l u e = = " n u m b e r " & & v a l u e > - 1 & & v a l u e % 1 = = 0 & & v a l u e < = M A X _ S A F E _ I N T E G E R } m o d u l e . e x p o r t s = i s L e n g t h } , { } ] , 2 5 0 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r b a s e I s M a p = r e q u i r e ( " . / _ b a s e I s M a p " ) , b a s e U n a r y = r e q u i r e ( " . / _ b a s e U n a r y " ) , n o d e U t i l = r e q u i r e ( " . / _ n o d e U t i l " ) ;
/* Node.js helper references. */ var nodeIsMap = nodeUtil && nodeUtil . isMap ;
/ * *
* Checks if ` value ` is classified as a ` Map ` object .
*
* @ static
* @ memberOf _
* @ since 4.3 . 0
* @ category Lang
* @ param { * } value The value to check .
* @ returns { boolean } Returns ` true ` if ` value ` is a map , else ` false ` .
* @ example
*
* _ . isMap ( new Map ) ;
* // => true
*
* _ . isMap ( new WeakMap ) ;
* // => false
* / v a r i s M a p = n o d e I s M a p ? b a s e U n a r y ( n o d e I s M a p ) : b a s e I s M a p ; m o d u l e . e x p o r t s = i s M a p } , { " . / _ b a s e I s M a p " : 9 9 , " . / _ b a s e U n a r y " : 1 2 7 , " . / _ n o d e U t i l " : 2 0 4 } ] , 2 5 1 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) {
/ * *
* Checks if ` value ` is the
* [ language type ] ( http : //www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
* of ` Object ` . ( e . g . arrays , functions , objects , regexes , ` new Number(0) ` , and ` new String('') ` )
*
* @ static
* @ memberOf _
* @ since 0.1 . 0
* @ category Lang
* @ param { * } value The value to check .
* @ returns { boolean } Returns ` true ` if ` value ` is an object , else ` false ` .
* @ example
*
* _ . isObject ( { } ) ;
* // => true
*
* _ . isObject ( [ 1 , 2 , 3 ] ) ;
* // => true
*
* _ . isObject ( _ . noop ) ;
* // => true
*
* _ . isObject ( null ) ;
* // => false
* /
function isObject ( value ) { var type = typeof value ; return value != null && ( type == "object" || type == "function" ) } module . exports = isObject } , { } ] , 252 : [ function ( require , module , exports ) {
/ * *
* Checks if ` value ` is object - like . A value is object - like if it ' s not ` null `
* and has a ` typeof ` result of "object" .
*
* @ static
* @ memberOf _
* @ since 4.0 . 0
* @ category Lang
* @ param { * } value The value to check .
* @ returns { boolean } Returns ` true ` if ` value ` is object - like , else ` false ` .
* @ example
*
* _ . isObjectLike ( { } ) ;
* // => true
*
* _ . isObjectLike ( [ 1 , 2 , 3 ] ) ;
* // => true
*
* _ . isObjectLike ( _ . noop ) ;
* // => false
*
* _ . isObjectLike ( null ) ;
* // => false
* /
function isObjectLike ( value ) { return value != null && typeof value == "object" } module . exports = isObjectLike } , { } ] , 253 : [ function ( require , module , exports ) { var baseGetTag = require ( "./_baseGetTag" ) , getPrototype = require ( "./_getPrototype" ) , isObjectLike = require ( "./isObjectLike" ) ;
/** `Object#toString` result references. */ var objectTag = "[object Object]" ;
/** Used for built-in method references. */ var funcProto = Function . prototype , objectProto = Object . prototype ;
/** Used to resolve the decompiled source of functions. */ var funcToString = funcProto . toString ;
/** Used to check objects for own properties. */ var hasOwnProperty = objectProto . hasOwnProperty ;
/** Used to infer the `Object` constructor. */ var objectCtorString = funcToString . call ( Object ) ;
/ * *
* Checks if ` value ` is a plain object , that is , an object created by the
* ` Object ` constructor or one with a ` [[Prototype]] ` of ` null ` .
*
* @ static
* @ memberOf _
* @ since 0.8 . 0
* @ category Lang
* @ param { * } value The value to check .
* @ returns { boolean } Returns ` true ` if ` value ` is a plain object , else ` false ` .
* @ example
*
* function Foo ( ) {
* this . a = 1 ;
* }
*
* _ . isPlainObject ( new Foo ) ;
* // => false
*
* _ . isPlainObject ( [ 1 , 2 , 3 ] ) ;
* // => false
*
* _ . isPlainObject ( { 'x' : 0 , 'y' : 0 } ) ;
* // => true
*
* _ . isPlainObject ( Object . create ( null ) ) ;
* // => true
* / f u n c t i o n i s P l a i n O b j e c t ( v a l u e ) { i f ( ! i s O b j e c t L i k e ( v a l u e ) | | b a s e G e t T a g ( v a l u e ) ! = o b j e c t T a g ) { r e t u r n f a l s e } v a r p r o t o = g e t P r o t o t y p e ( v a l u e ) ; i f ( p r o t o = = = n u l l ) { r e t u r n t r u e } v a r C t o r = h a s O w n P r o p e r t y . c a l l ( p r o t o , " c o n s t r u c t o r " ) & & p r o t o . c o n s t r u c t o r ; r e t u r n t y p e o f C t o r = = " f u n c t i o n " & & C t o r i n s t a n c e o f C t o r & & f u n c T o S t r i n g . c a l l ( C t o r ) = = o b j e c t C t o r S t r i n g } m o d u l e . e x p o r t s = i s P l a i n O b j e c t } , { " . / _ b a s e G e t T a g " : 9 1 , " . / _ g e t P r o t o t y p e " : 1 6 4 , " . / i s O b j e c t L i k e " : 2 5 2 } ] , 2 5 4 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r b a s e I s S e t = r e q u i r e ( " . / _ b a s e I s S e t " ) , b a s e U n a r y = r e q u i r e ( " . / _ b a s e U n a r y " ) , n o d e U t i l = r e q u i r e ( " . / _ n o d e U t i l " ) ;
/* Node.js helper references. */ var nodeIsSet = nodeUtil && nodeUtil . isSet ;
/ * *
* Checks if ` value ` is classified as a ` Set ` object .
*
* @ static
* @ memberOf _
* @ since 4.3 . 0
* @ category Lang
* @ param { * } value The value to check .
* @ returns { boolean } Returns ` true ` if ` value ` is a set , else ` false ` .
* @ example
*
* _ . isSet ( new Set ) ;
* // => true
*
* _ . isSet ( new WeakSet ) ;
* // => false
* / v a r i s S e t = n o d e I s S e t ? b a s e U n a r y ( n o d e I s S e t ) : b a s e I s S e t ; m o d u l e . e x p o r t s = i s S e t } , { " . / _ b a s e I s S e t " : 1 0 3 , " . / _ b a s e U n a r y " : 1 2 7 , " . / _ n o d e U t i l " : 2 0 4 } ] , 2 5 5 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r b a s e G e t T a g = r e q u i r e ( " . / _ b a s e G e t T a g " ) , i s A r r a y = r e q u i r e ( " . / i s A r r a y " ) , i s O b j e c t L i k e = r e q u i r e ( " . / i s O b j e c t L i k e " ) ;
/** `Object#toString` result references. */ var stringTag = "[object String]" ;
/ * *
* Checks if ` value ` is classified as a ` String ` primitive or object .
*
* @ static
* @ since 0.1 . 0
* @ memberOf _
* @ category Lang
* @ param { * } value The value to check .
* @ returns { boolean } Returns ` true ` if ` value ` is a string , else ` false ` .
* @ example
*
* _ . isString ( 'abc' ) ;
* // => true
*
* _ . isString ( 1 ) ;
* // => false
* / f u n c t i o n i s S t r i n g ( v a l u e ) { r e t u r n t y p e o f v a l u e = = " s t r i n g " | | ! i s A r r a y ( v a l u e ) & & i s O b j e c t L i k e ( v a l u e ) & & b a s e G e t T a g ( v a l u e ) = = s t r i n g T a g } m o d u l e . e x p o r t s = i s S t r i n g } , { " . / _ b a s e G e t T a g " : 9 1 , " . / i s A r r a y " : 2 4 3 , " . / i s O b j e c t L i k e " : 2 5 2 } ] , 2 5 6 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r b a s e G e t T a g = r e q u i r e ( " . / _ b a s e G e t T a g " ) , i s O b j e c t L i k e = r e q u i r e ( " . / i s O b j e c t L i k e " ) ;
/** `Object#toString` result references. */ var symbolTag = "[object Symbol]" ;
/ * *
* Checks if ` value ` is classified as a ` Symbol ` primitive or object .
*
* @ static
* @ memberOf _
* @ since 4.0 . 0
* @ category Lang
* @ param { * } value The value to check .
* @ returns { boolean } Returns ` true ` if ` value ` is a symbol , else ` false ` .
* @ example
*
* _ . isSymbol ( Symbol . iterator ) ;
* // => true
*
* _ . isSymbol ( 'abc' ) ;
* // => false
* / f u n c t i o n i s S y m b o l ( v a l u e ) { r e t u r n t y p e o f v a l u e = = " s y m b o l " | | i s O b j e c t L i k e ( v a l u e ) & & b a s e G e t T a g ( v a l u e ) = = s y m b o l T a g } m o d u l e . e x p o r t s = i s S y m b o l } , { " . / _ b a s e G e t T a g " : 9 1 , " . / i s O b j e c t L i k e " : 2 5 2 } ] , 2 5 7 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r b a s e I s T y p e d A r r a y = r e q u i r e ( " . / _ b a s e I s T y p e d A r r a y " ) , b a s e U n a r y = r e q u i r e ( " . / _ b a s e U n a r y " ) , n o d e U t i l = r e q u i r e ( " . / _ n o d e U t i l " ) ;
/* Node.js helper references. */ var nodeIsTypedArray = nodeUtil && nodeUtil . isTypedArray ;
/ * *
* Checks if ` value ` is classified as a typed array .
*
* @ static
* @ memberOf _
* @ since 3.0 . 0
* @ category Lang
* @ param { * } value The value to check .
* @ returns { boolean } Returns ` true ` if ` value ` is a typed array , else ` false ` .
* @ example
*
* _ . isTypedArray ( new Uint8Array ) ;
* // => true
*
* _ . isTypedArray ( [ ] ) ;
* // => false
* / v a r i s T y p e d A r r a y = n o d e I s T y p e d A r r a y ? b a s e U n a r y ( n o d e I s T y p e d A r r a y ) : b a s e I s T y p e d A r r a y ; m o d u l e . e x p o r t s = i s T y p e d A r r a y } , { " . / _ b a s e I s T y p e d A r r a y " : 1 0 4 , " . / _ b a s e U n a r y " : 1 2 7 , " . / _ n o d e U t i l " : 2 0 4 } ] , 2 5 8 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) {
/ * *
* Checks if ` value ` is ` undefined ` .
*
* @ static
* @ since 0.1 . 0
* @ memberOf _
* @ category Lang
* @ param { * } value The value to check .
* @ returns { boolean } Returns ` true ` if ` value ` is ` undefined ` , else ` false ` .
* @ example
*
* _ . isUndefined ( void 0 ) ;
* // => true
*
* _ . isUndefined ( null ) ;
* // => false
* /
function isUndefined ( value ) { return value === undefined } module . exports = isUndefined } , { } ] , 259 : [ function ( require , module , exports ) { var arrayLikeKeys = require ( "./_arrayLikeKeys" ) , baseKeys = require ( "./_baseKeys" ) , isArrayLike = require ( "./isArrayLike" ) ;
/ * *
* Creates an array of the own enumerable property names of ` object ` .
*
* * * Note : * * Non - object values are coerced to objects . See the
* [ ES spec ] ( http : //ecma-international.org/ecma-262/7.0/#sec-object.keys)
* for more details .
*
* @ static
* @ since 0.1 . 0
* @ memberOf _
* @ category Object
* @ param { Object } object The object to query .
* @ returns { Array } Returns the array of property names .
* @ example
*
* function Foo ( ) {
* this . a = 1 ;
* this . b = 2 ;
* }
*
* Foo . prototype . c = 3 ;
*
* _ . keys ( new Foo ) ;
* // => ['a', 'b'] (iteration order is not guaranteed)
*
* _ . keys ( 'hi' ) ;
* // => ['0', '1']
* / f u n c t i o n k e y s ( o b j e c t ) { r e t u r n i s A r r a y L i k e ( o b j e c t ) ? a r r a y L i k e K e y s ( o b j e c t ) : b a s e K e y s ( o b j e c t ) } m o d u l e . e x p o r t s = k e y s } , { " . / _ a r r a y L i k e K e y s " : 6 8 , " . / _ b a s e K e y s " : 1 0 6 , " . / i s A r r a y L i k e " : 2 4 4 } ] , 2 6 0 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r a r r a y L i k e K e y s = r e q u i r e ( " . / _ a r r a y L i k e K e y s " ) , b a s e K e y s I n = r e q u i r e ( " . / _ b a s e K e y s I n " ) , i s A r r a y L i k e = r e q u i r e ( " . / i s A r r a y L i k e " ) ;
/ * *
* Creates an array of the own and inherited enumerable property names of ` object ` .
*
* * * Note : * * Non - object values are coerced to objects .
*
* @ static
* @ memberOf _
* @ since 3.0 . 0
* @ category Object
* @ param { Object } object The object to query .
* @ returns { Array } Returns the array of property names .
* @ example
*
* function Foo ( ) {
* this . a = 1 ;
* this . b = 2 ;
* }
*
* Foo . prototype . c = 3 ;
*
* _ . keysIn ( new Foo ) ;
* // => ['a', 'b', 'c'] (iteration order is not guaranteed)
* / f u n c t i o n k e y s I n ( o b j e c t ) { r e t u r n i s A r r a y L i k e ( o b j e c t ) ? a r r a y L i k e K e y s ( o b j e c t , t r u e ) : b a s e K e y s I n ( o b j e c t ) } m o d u l e . e x p o r t s = k e y s I n } , { " . / _ a r r a y L i k e K e y s " : 6 8 , " . / _ b a s e K e y s I n " : 1 0 7 , " . / i s A r r a y L i k e " : 2 4 4 } ] , 2 6 1 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) {
/ * *
* Gets the last element of ` array ` .
*
* @ static
* @ memberOf _
* @ since 0.1 . 0
* @ category Array
* @ param { Array } array The array to query .
* @ returns { * } Returns the last element of ` array ` .
* @ example
*
* _ . last ( [ 1 , 2 , 3 ] ) ;
* // => 3
* /
function last ( array ) { var length = array == null ? 0 : array . length ; return length ? array [ length - 1 ] : undefined } module . exports = last } , { } ] , 262 : [ function ( require , module , exports ) { var arrayMap = require ( "./_arrayMap" ) , baseIteratee = require ( "./_baseIteratee" ) , baseMap = require ( "./_baseMap" ) , isArray = require ( "./isArray" ) ;
/ * *
* Creates an array of values by running each element in ` collection ` thru
* ` iteratee ` . The iteratee is invoked with three arguments :
* ( value , index | key , collection ) .
*
* Many lodash methods are guarded to work as iteratees for methods like
* ` _.every ` , ` _.filter ` , ` _.map ` , ` _.mapValues ` , ` _.reject ` , and ` _.some ` .
*
* The guarded methods are :
* ` ary ` , ` chunk ` , ` curry ` , ` curryRight ` , ` drop ` , ` dropRight ` , ` every ` ,
* ` fill ` , ` invert ` , ` parseInt ` , ` random ` , ` range ` , ` rangeRight ` , ` repeat ` ,
* ` sampleSize ` , ` slice ` , ` some ` , ` sortBy ` , ` split ` , ` take ` , ` takeRight ` ,
* ` template ` , ` trim ` , ` trimEnd ` , ` trimStart ` , and ` words `
*
* @ static
* @ memberOf _
* @ since 0.1 . 0
* @ category Collection
* @ param { Array | Object } collection The collection to iterate over .
* @ param { Function } [ iteratee = _ . identity ] The function invoked per iteration .
* @ returns { Array } Returns the new mapped array .
* @ example
*
* function square ( n ) {
* return n * n ;
* }
*
* _ . map ( [ 4 , 8 ] , square ) ;
* // => [16, 64]
*
* _ . map ( { 'a' : 4 , 'b' : 8 } , square ) ;
* // => [16, 64] (iteration order is not guaranteed)
*
* var users = [
* { 'user' : 'barney' } ,
* { 'user' : 'fred' }
* ] ;
*
* // The `_.property` iteratee shorthand.
* _ . map ( users , 'user' ) ;
* // => ['barney', 'fred']
* / f u n c t i o n m a p ( c o l l e c t i o n , i t e r a t e e ) { v a r f u n c = i s A r r a y ( c o l l e c t i o n ) ? a r r a y M a p : b a s e M a p ; r e t u r n f u n c ( c o l l e c t i o n , b a s e I t e r a t e e ( i t e r a t e e , 3 ) ) } m o d u l e . e x p o r t s = m a p } , { " . / _ a r r a y M a p " : 6 9 , " . / _ b a s e I t e r a t e e " : 1 0 5 , " . / _ b a s e M a p " : 1 0 9 , " . / i s A r r a y " : 2 4 3 } ] , 2 6 3 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r b a s e A s s i g n V a l u e = r e q u i r e ( " . / _ b a s e A s s i g n V a l u e " ) , b a s e F o r O w n = r e q u i r e ( " . / _ b a s e F o r O w n " ) , b a s e I t e r a t e e = r e q u i r e ( " . / _ b a s e I t e r a t e e " ) ;
/ * *
* Creates an object with the same keys as ` object ` and values generated
* by running each own enumerable string keyed property of ` object ` thru
* ` iteratee ` . The iteratee is invoked with three arguments :
* ( value , key , object ) .
*
* @ static
* @ memberOf _
* @ since 2.4 . 0
* @ category Object
* @ param { Object } object The object to iterate over .
* @ param { Function } [ iteratee = _ . identity ] The function invoked per iteration .
* @ returns { Object } Returns the new mapped object .
* @ see _ . mapKeys
* @ example
*
* var users = {
* 'fred' : { 'user' : 'fred' , 'age' : 40 } ,
* 'pebbles' : { 'user' : 'pebbles' , 'age' : 1 }
* } ;
*
* _ . mapValues ( users , function ( o ) { return o . age ; } ) ;
* // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
*
* // The `_.property` iteratee shorthand.
* _ . mapValues ( users , 'age' ) ;
* // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
* / f u n c t i o n m a p V a l u e s ( o b j e c t , i t e r a t e e ) { v a r r e s u l t = { } ; i t e r a t e e = b a s e I t e r a t e e ( i t e r a t e e , 3 ) ; b a s e F o r O w n ( o b j e c t , f u n c t i o n ( v a l u e , k e y , o b j e c t ) { b a s e A s s i g n V a l u e ( r e s u l t , k e y , i t e r a t e e ( v a l u e , k e y , o b j e c t ) ) } ) ; r e t u r n r e s u l t } m o d u l e . e x p o r t s = m a p V a l u e s } , { " . / _ b a s e A s s i g n V a l u e " : 7 9 , " . / _ b a s e F o r O w n " : 8 8 , " . / _ b a s e I t e r a t e e " : 1 0 5 } ] , 2 6 4 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r b a s e E x t r e m u m = r e q u i r e ( " . / _ b a s e E x t r e m u m " ) , b a s e G t = r e q u i r e ( " . / _ b a s e G t " ) , i d e n t i t y = r e q u i r e ( " . / i d e n t i t y " ) ;
/ * *
* Computes the maximum value of ` array ` . If ` array ` is empty or falsey ,
* ` undefined ` is returned .
*
* @ static
* @ since 0.1 . 0
* @ memberOf _
* @ category Math
* @ param { Array } array The array to iterate over .
* @ returns { * } Returns the maximum value .
* @ example
*
* _ . max ( [ 4 , 2 , 8 , 6 ] ) ;
* // => 8
*
* _ . max ( [ ] ) ;
* // => undefined
* / f u n c t i o n m a x ( a r r a y ) { r e t u r n a r r a y & & a r r a y . l e n g t h ? b a s e E x t r e m u m ( a r r a y , i d e n t i t y , b a s e G t ) : u n d e f i n e d } m o d u l e . e x p o r t s = m a x } , { " . / _ b a s e E x t r e m u m " : 8 3 , " . / _ b a s e G t " : 9 2 , " . / i d e n t i t y " : 2 4 1 } ] , 2 6 5 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r M a p C a c h e = r e q u i r e ( " . / _ M a p C a c h e " ) ;
/** Error message constants. */ var FUNC _ERROR _TEXT = "Expected a function" ;
/ * *
* Creates a function that memoizes the result of ` func ` . If ` resolver ` is
* provided , it determines the cache key for storing the result based on the
* arguments provided to the memoized function . By default , the first argument
* provided to the memoized function is used as the map cache key . The ` func `
* is invoked with the ` this ` binding of the memoized function .
*
* * * Note : * * The cache is exposed as the ` cache ` property on the memoized
* function . Its creation may be customized by replacing the ` _.memoize.Cache `
* constructor with one whose instances implement the
* [ ` Map ` ] ( http : //ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
* method interface of ` clear ` , ` delete ` , ` get ` , ` has ` , and ` set ` .
*
* @ static
* @ memberOf _
* @ since 0.1 . 0
* @ category Function
* @ param { Function } func The function to have its output memoized .
* @ param { Function } [ resolver ] The function to resolve the cache key .
* @ returns { Function } Returns the new memoized function .
* @ example
*
* var object = { 'a' : 1 , 'b' : 2 } ;
* var other = { 'c' : 3 , 'd' : 4 } ;
*
* var values = _ . memoize ( _ . values ) ;
* values ( object ) ;
* // => [1, 2]
*
* values ( other ) ;
* // => [3, 4]
*
* object . a = 2 ;
* values ( object ) ;
* // => [1, 2]
*
* // Modify the result cache.
* values . cache . set ( object , [ 'a' , 'b' ] ) ;
* values ( object ) ;
* // => ['a', 'b']
*
* // Replace `_.memoize.Cache`.
* _ . memoize . Cache = WeakMap ;
* / f u n c t i o n m e m o i z e ( f u n c , r e s o l v e r ) { i f ( t y p e o f f u n c ! = " f u n c t i o n " | | r e s o l v e r ! = n u l l & & t y p e o f r e s o l v e r ! = " f u n c t i o n " ) { t h r o w n e w T y p e E r r o r ( F U N C _ E R R O R _ T E X T ) } v a r m e m o i z e d = f u n c t i o n ( ) { v a r a r g s = a r g u m e n t s , k e y = r e s o l v e r ? r e s o l v e r . a p p l y ( t h i s , a r g s ) : a r g s [ 0 ] , c a c h e = m e m o i z e d . c a c h e ; i f ( c a c h e . h a s ( k e y ) ) { r e t u r n c a c h e . g e t ( k e y ) } v a r r e s u l t = f u n c . a p p l y ( t h i s , a r g s ) ; m e m o i z e d . c a c h e = c a c h e . s e t ( k e y , r e s u l t ) | | c a c h e ; r e t u r n r e s u l t } ; m e m o i z e d . c a c h e = n e w ( m e m o i z e . C a c h e | | M a p C a c h e ) ; r e t u r n m e m o i z e d }
// Expose `MapCache`.
memoize . Cache = MapCache ; module . exports = memoize } , { "./_MapCache" : 55 } ] , 266 : [ function ( require , module , exports ) { var baseMerge = require ( "./_baseMerge" ) , createAssigner = require ( "./_createAssigner" ) ;
/ * *
* This method is like ` _.assign ` except that it recursively merges own and
* inherited enumerable string keyed properties of source objects into the
* destination object . Source properties that resolve to ` undefined ` are
* skipped if a destination value exists . Array and plain object properties
* are merged recursively . Other objects and value types are overridden by
* assignment . Source objects are applied from left to right . Subsequent
* sources overwrite property assignments of previous sources .
*
* * * Note : * * This method mutates ` object ` .
*
* @ static
* @ memberOf _
* @ since 0.5 . 0
* @ category Object
* @ param { Object } object The destination object .
* @ param { ... Object } [ sources ] The source objects .
* @ returns { Object } Returns ` object ` .
* @ example
*
* var object = {
* 'a' : [ { 'b' : 2 } , { 'd' : 4 } ]
* } ;
*
* var other = {
* 'a' : [ { 'c' : 3 } , { 'e' : 5 } ]
* } ;
*
* _ . merge ( object , other ) ;
* // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
* / v a r m e r g e = c r e a t e A s s i g n e r ( f u n c t i o n ( o b j e c t , s o u r c e , s r c I n d e x ) { b a s e M e r g e ( o b j e c t , s o u r c e , s r c I n d e x ) } ) ; m o d u l e . e x p o r t s = m e r g e } , { " . / _ b a s e M e r g e " : 1 1 2 , " . / _ c r e a t e A s s i g n e r " : 1 4 7 } ] , 2 6 7 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r b a s e E x t r e m u m = r e q u i r e ( " . / _ b a s e E x t r e m u m " ) , b a s e L t = r e q u i r e ( " . / _ b a s e L t " ) , i d e n t i t y = r e q u i r e ( " . / i d e n t i t y " ) ;
/ * *
* Computes the minimum value of ` array ` . If ` array ` is empty or falsey ,
* ` undefined ` is returned .
*
* @ static
* @ since 0.1 . 0
* @ memberOf _
* @ category Math
* @ param { Array } array The array to iterate over .
* @ returns { * } Returns the minimum value .
* @ example
*
* _ . min ( [ 4 , 2 , 8 , 6 ] ) ;
* // => 2
*
* _ . min ( [ ] ) ;
* // => undefined
* / f u n c t i o n m i n ( a r r a y ) { r e t u r n a r r a y & & a r r a y . l e n g t h ? b a s e E x t r e m u m ( a r r a y , i d e n t i t y , b a s e L t ) : u n d e f i n e d } m o d u l e . e x p o r t s = m i n } , { " . / _ b a s e E x t r e m u m " : 8 3 , " . / _ b a s e L t " : 1 0 8 , " . / i d e n t i t y " : 2 4 1 } ] , 2 6 8 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r b a s e E x t r e m u m = r e q u i r e ( " . / _ b a s e E x t r e m u m " ) , b a s e I t e r a t e e = r e q u i r e ( " . / _ b a s e I t e r a t e e " ) , b a s e L t = r e q u i r e ( " . / _ b a s e L t " ) ;
/ * *
* This method is like ` _.min ` except that it accepts ` iteratee ` which is
* invoked for each element in ` array ` to generate the criterion by which
* the value is ranked . The iteratee is invoked with one argument : ( value ) .
*
* @ static
* @ memberOf _
* @ since 4.0 . 0
* @ category Math
* @ param { Array } array The array to iterate over .
* @ param { Function } [ iteratee = _ . identity ] The iteratee invoked per element .
* @ returns { * } Returns the minimum value .
* @ example
*
* var objects = [ { 'n' : 1 } , { 'n' : 2 } ] ;
*
* _ . minBy ( objects , function ( o ) { return o . n ; } ) ;
* // => { 'n': 1 }
*
* // The `_.property` iteratee shorthand.
* _ . minBy ( objects , 'n' ) ;
* // => { 'n': 1 }
* / f u n c t i o n m i n B y ( a r r a y , i t e r a t e e ) { r e t u r n a r r a y & & a r r a y . l e n g t h ? b a s e E x t r e m u m ( a r r a y , b a s e I t e r a t e e ( i t e r a t e e , 2 ) , b a s e L t ) : u n d e f i n e d } m o d u l e . e x p o r t s = m i n B y } , { " . / _ b a s e E x t r e m u m " : 8 3 , " . / _ b a s e I t e r a t e e " : 1 0 5 , " . / _ b a s e L t " : 1 0 8 } ] , 2 6 9 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) {
/ * *
* This method returns ` undefined ` .
*
* @ static
* @ memberOf _
* @ since 2.3 . 0
* @ category Util
* @ example
*
* _ . times ( 2 , _ . noop ) ;
* // => [undefined, undefined]
* /
function noop ( ) {
// No operation performed.
} module . exports = noop } , { } ] , 270 : [ function ( require , module , exports ) { var root = require ( "./_root" ) ;
/ * *
* Gets the timestamp of the number of milliseconds that have elapsed since
* the Unix epoch ( 1 January 1970 00 : 00 : 00 UTC ) .
*
* @ static
* @ memberOf _
* @ since 2.4 . 0
* @ category Date
* @ returns { number } Returns the timestamp .
* @ example
*
* _ . defer ( function ( stamp ) {
* console . log ( _ . now ( ) - stamp ) ;
* } , _ . now ( ) ) ;
* // => Logs the number of milliseconds it took for the deferred invocation.
* / v a r n o w = f u n c t i o n ( ) { r e t u r n r o o t . D a t e . n o w ( ) } ; m o d u l e . e x p o r t s = n o w } , { " . / _ r o o t " : 2 0 8 } ] , 2 7 1 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r b a s e P i c k = r e q u i r e ( " . / _ b a s e P i c k " ) , f l a t R e s t = r e q u i r e ( " . / _ f l a t R e s t " ) ;
/ * *
* Creates an object composed of the picked ` object ` properties .
*
* @ static
* @ since 0.1 . 0
* @ memberOf _
* @ category Object
* @ param { Object } object The source object .
* @ param { ... ( string | string [ ] ) } [ paths ] The property paths to pick .
* @ returns { Object } Returns the new object .
* @ example
*
* var object = { 'a' : 1 , 'b' : '2' , 'c' : 3 } ;
*
* _ . pick ( object , [ 'a' , 'c' ] ) ;
* // => { 'a': 1, 'c': 3 }
* / v a r p i c k = f l a t R e s t ( f u n c t i o n ( o b j e c t , p a t h s ) { r e t u r n o b j e c t = = n u l l ? { } : b a s e P i c k ( o b j e c t , p a t h s ) } ) ; m o d u l e . e x p o r t s = p i c k } , { " . / _ b a s e P i c k " : 1 1 5 , " . / _ f l a t R e s t " : 1 5 7 } ] , 2 7 2 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r b a s e P r o p e r t y = r e q u i r e ( " . / _ b a s e P r o p e r t y " ) , b a s e P r o p e r t y D e e p = r e q u i r e ( " . / _ b a s e P r o p e r t y D e e p " ) , i s K e y = r e q u i r e ( " . / _ i s K e y " ) , t o K e y = r e q u i r e ( " . / _ t o K e y " ) ;
/ * *
* Creates a function that returns the value at ` path ` of a given object .
*
* @ static
* @ memberOf _
* @ since 2.4 . 0
* @ category Util
* @ param { Array | string } path The path of the property to get .
* @ returns { Function } Returns the new accessor function .
* @ example
*
* var objects = [
* { 'a' : { 'b' : 2 } } ,
* { 'a' : { 'b' : 1 } }
* ] ;
*
* _ . map ( objects , _ . property ( 'a.b' ) ) ;
* // => [2, 1]
*
* _ . map ( _ . sortBy ( objects , _ . property ( [ 'a' , 'b' ] ) ) , 'a.b' ) ;
* // => [1, 2]
* / f u n c t i o n p r o p e r t y ( p a t h ) { r e t u r n i s K e y ( p a t h ) ? b a s e P r o p e r t y ( t o K e y ( p a t h ) ) : b a s e P r o p e r t y D e e p ( p a t h ) } m o d u l e . e x p o r t s = p r o p e r t y } , { " . / _ b a s e P r o p e r t y " : 1 1 7 , " . / _ b a s e P r o p e r t y D e e p " : 1 1 8 , " . / _ i s K e y " : 1 8 3 , " . / _ t o K e y " : 2 2 3 } ] , 2 7 3 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r c r e a t e R a n g e = r e q u i r e ( " . / _ c r e a t e R a n g e " ) ;
/ * *
* Creates an array of numbers ( positive and / or negative ) progressing from
* ` start ` up to , but not including , ` end ` . A step of ` -1 ` is used if a negative
* ` start ` is specified without an ` end ` or ` step ` . If ` end ` is not specified ,
* it ' s set to ` start ` with ` start ` then set to ` 0 ` .
*
* * * Note : * * JavaScript follows the IEEE - 754 standard for resolving
* floating - point values which can produce unexpected results .
*
* @ static
* @ since 0.1 . 0
* @ memberOf _
* @ category Util
* @ param { number } [ start = 0 ] The start of the range .
* @ param { number } end The end of the range .
* @ param { number } [ step = 1 ] The value to increment or decrement by .
* @ returns { Array } Returns the range of numbers .
* @ see _ . inRange , _ . rangeRight
* @ example
*
* _ . range ( 4 ) ;
* // => [0, 1, 2, 3]
*
* _ . range ( - 4 ) ;
* // => [0, -1, -2, -3]
*
* _ . range ( 1 , 5 ) ;
* // => [1, 2, 3, 4]
*
* _ . range ( 0 , 20 , 5 ) ;
* // => [0, 5, 10, 15]
*
* _ . range ( 0 , - 4 , - 1 ) ;
* // => [0, -1, -2, -3]
*
* _ . range ( 1 , 4 , 0 ) ;
* // => [1, 1, 1]
*
* _ . range ( 0 ) ;
* // => []
* / v a r r a n g e = c r e a t e R a n g e ( ) ; m o d u l e . e x p o r t s = r a n g e } , { " . / _ c r e a t e R a n g e " : 1 5 1 } ] , 2 7 4 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r a r r a y R e d u c e = r e q u i r e ( " . / _ a r r a y R e d u c e " ) , b a s e E a c h = r e q u i r e ( " . / _ b a s e E a c h " ) , b a s e I t e r a t e e = r e q u i r e ( " . / _ b a s e I t e r a t e e " ) , b a s e R e d u c e = r e q u i r e ( " . / _ b a s e R e d u c e " ) , i s A r r a y = r e q u i r e ( " . / i s A r r a y " ) ;
/ * *
* Reduces ` collection ` to a value which is the accumulated result of running
* each element in ` collection ` thru ` iteratee ` , where each successive
* invocation is supplied the return value of the previous . If ` accumulator `
* is not given , the first element of ` collection ` is used as the initial
* value . The iteratee is invoked with four arguments :
* ( accumulator , value , index | key , collection ) .
*
* Many lodash methods are guarded to work as iteratees for methods like
* ` _.reduce ` , ` _.reduceRight ` , and ` _.transform ` .
*
* The guarded methods are :
* ` assign ` , ` defaults ` , ` defaultsDeep ` , ` includes ` , ` merge ` , ` orderBy ` ,
* and ` sortBy `
*
* @ static
* @ memberOf _
* @ since 0.1 . 0
* @ category Collection
* @ param { Array | Object } collection The collection to iterate over .
* @ param { Function } [ iteratee = _ . identity ] The function invoked per iteration .
* @ param { * } [ accumulator ] The initial value .
* @ returns { * } Returns the accumulated value .
* @ see _ . reduceRight
* @ example
*
* _ . reduce ( [ 1 , 2 ] , function ( sum , n ) {
* return sum + n ;
* } , 0 ) ;
* // => 3
*
* _ . reduce ( { 'a' : 1 , 'b' : 2 , 'c' : 1 } , function ( result , value , key ) {
* ( result [ value ] || ( result [ value ] = [ ] ) ) . push ( key ) ;
* return result ;
* } , { } ) ;
* // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
* / f u n c t i o n r e d u c e ( c o l l e c t i o n , i t e r a t e e , a c c u m u l a t o r ) { v a r f u n c = i s A r r a y ( c o l l e c t i o n ) ? a r r a y R e d u c e : b a s e R e d u c e , i n i t A c c u m = a r g u m e n t s . l e n g t h < 3 ; r e t u r n f u n c ( c o l l e c t i o n , b a s e I t e r a t e e ( i t e r a t e e , 4 ) , a c c u m u l a t o r , i n i t A c c u m , b a s e E a c h ) } m o d u l e . e x p o r t s = r e d u c e } , { " . / _ a r r a y R e d u c e " : 7 1 , " . / _ b a s e E a c h " : 8 2 , " . / _ b a s e I t e r a t e e " : 1 0 5 , " . / _ b a s e R e d u c e " : 1 2 0 , " . / i s A r r a y " : 2 4 3 } ] , 2 7 5 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r b a s e K e y s = r e q u i r e ( " . / _ b a s e K e y s " ) , g e t T a g = r e q u i r e ( " . / _ g e t T a g " ) , i s A r r a y L i k e = r e q u i r e ( " . / i s A r r a y L i k e " ) , i s S t r i n g = r e q u i r e ( " . / i s S t r i n g " ) , s t r i n g S i z e = r e q u i r e ( " . / _ s t r i n g S i z e " ) ;
/** `Object#toString` result references. */ var mapTag = "[object Map]" , setTag = "[object Set]" ;
/ * *
* Gets the size of ` collection ` by returning its length for array - like
* values or the number of own enumerable string keyed properties for objects .
*
* @ static
* @ memberOf _
* @ since 0.1 . 0
* @ category Collection
* @ param { Array | Object | string } collection The collection to inspect .
* @ returns { number } Returns the collection size .
* @ example
*
* _ . size ( [ 1 , 2 , 3 ] ) ;
* // => 3
*
* _ . size ( { 'a' : 1 , 'b' : 2 } ) ;
* // => 2
*
* _ . size ( 'pebbles' ) ;
* // => 7
* / f u n c t i o n s i z e ( c o l l e c t i o n ) { i f ( c o l l e c t i o n = = n u l l ) { r e t u r n 0 } i f ( i s A r r a y L i k e ( c o l l e c t i o n ) ) { r e t u r n i s S t r i n g ( c o l l e c t i o n ) ? s t r i n g S i z e ( c o l l e c t i o n ) : c o l l e c t i o n . l e n g t h } v a r t a g = g e t T a g ( c o l l e c t i o n ) ; i f ( t a g = = m a p T a g | | t a g = = s e t T a g ) { r e t u r n c o l l e c t i o n . s i z e } r e t u r n b a s e K e y s ( c o l l e c t i o n ) . l e n g t h } m o d u l e . e x p o r t s = s i z e } , { " . / _ b a s e K e y s " : 1 0 6 , " . / _ g e t T a g " : 1 6 8 , " . / _ s t r i n g S i z e " : 2 2 1 , " . / i s A r r a y L i k e " : 2 4 4 , " . / i s S t r i n g " : 2 5 5 } ] , 2 7 6 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r b a s e F l a t t e n = r e q u i r e ( " . / _ b a s e F l a t t e n " ) , b a s e O r d e r B y = r e q u i r e ( " . / _ b a s e O r d e r B y " ) , b a s e R e s t = r e q u i r e ( " . / _ b a s e R e s t " ) , i s I t e r a t e e C a l l = r e q u i r e ( " . / _ i s I t e r a t e e C a l l " ) ;
/ * *
* Creates an array of elements , sorted in ascending order by the results of
* running each element in a collection thru each iteratee . This method
* performs a stable sort , that is , it preserves the original sort order of
* equal elements . The iteratees are invoked with one argument : ( value ) .
*
* @ static
* @ memberOf _
* @ since 0.1 . 0
* @ category Collection
* @ param { Array | Object } collection The collection to iterate over .
* @ param { ... ( Function | Function [ ] ) } [ iteratees = [ _ . identity ] ]
* The iteratees to sort by .
* @ returns { Array } Returns the new sorted array .
* @ example
*
* var users = [
* { 'user' : 'fred' , 'age' : 48 } ,
* { 'user' : 'barney' , 'age' : 36 } ,
* { 'user' : 'fred' , 'age' : 40 } ,
* { 'user' : 'barney' , 'age' : 34 }
* ] ;
*
* _ . sortBy ( users , [ function ( o ) { return o . user ; } ] ) ;
* // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
*
* _ . sortBy ( users , [ 'user' , 'age' ] ) ;
* // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]
* / v a r s o r t B y = b a s e R e s t ( f u n c t i o n ( c o l l e c t i o n , i t e r a t e e s ) { i f ( c o l l e c t i o n = = n u l l ) { r e t u r n [ ] } v a r l e n g t h = i t e r a t e e s . l e n g t h ; i f ( l e n g t h > 1 & & i s I t e r a t e e C a l l ( c o l l e c t i o n , i t e r a t e e s [ 0 ] , i t e r a t e e s [ 1 ] ) ) { i t e r a t e e s = [ ] } e l s e i f ( l e n g t h > 2 & & i s I t e r a t e e C a l l ( i t e r a t e e s [ 0 ] , i t e r a t e e s [ 1 ] , i t e r a t e e s [ 2 ] ) ) { i t e r a t e e s = [ i t e r a t e e s [ 0 ] ] } r e t u r n b a s e O r d e r B y ( c o l l e c t i o n , b a s e F l a t t e n ( i t e r a t e e s , 1 ) , [ ] ) } ) ; m o d u l e . e x p o r t s = s o r t B y } , { " . / _ b a s e F l a t t e n " : 8 6 , " . / _ b a s e O r d e r B y " : 1 1 4 , " . / _ b a s e R e s t " : 1 2 1 , " . / _ i s I t e r a t e e C a l l " : 1 8 2 } ] , 2 7 7 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) {
/ * *
* This method returns a new empty array .
*
* @ static
* @ memberOf _
* @ since 4.13 . 0
* @ category Util
* @ returns { Array } Returns the new empty array .
* @ example
*
* var arrays = _ . times ( 2 , _ . stubArray ) ;
*
* console . log ( arrays ) ;
* // => [[], []]
*
* console . log ( arrays [ 0 ] === arrays [ 1 ] ) ;
* // => false
* /
function stubArray ( ) { return [ ] } module . exports = stubArray } , { } ] , 278 : [ function ( require , module , exports ) {
/ * *
* This method returns ` false ` .
*
* @ static
* @ memberOf _
* @ since 4.13 . 0
* @ category Util
* @ returns { boolean } Returns ` false ` .
* @ example
*
* _ . times ( 2 , _ . stubFalse ) ;
* // => [false, false]
* /
function stubFalse ( ) { return false } module . exports = stubFalse } , { } ] , 279 : [ function ( require , module , exports ) { var toNumber = require ( "./toNumber" ) ;
/** Used as references for various `Number` constants. */ var INFINITY = 1 / 0 , MAX _INTEGER = 17976931348623157e292 ;
/ * *
* Converts ` value ` to a finite number .
*
* @ static
* @ memberOf _
* @ since 4.12 . 0
* @ category Lang
* @ param { * } value The value to convert .
* @ returns { number } Returns the converted number .
* @ example
*
* _ . toFinite ( 3.2 ) ;
* // => 3.2
*
* _ . toFinite ( Number . MIN _VALUE ) ;
* // => 5e-324
*
* _ . toFinite ( Infinity ) ;
* // => 1.7976931348623157e+308
*
* _ . toFinite ( '3.2' ) ;
* // => 3.2
* / f u n c t i o n t o F i n i t e ( v a l u e ) { i f ( ! v a l u e ) { r e t u r n v a l u e = = = 0 ? v a l u e : 0 } v a l u e = t o N u m b e r ( v a l u e ) ; i f ( v a l u e = = = I N F I N I T Y | | v a l u e = = = - I N F I N I T Y ) { v a r s i g n = v a l u e < 0 ? - 1 : 1 ; r e t u r n s i g n * M A X _ I N T E G E R } r e t u r n v a l u e = = = v a l u e ? v a l u e : 0 } m o d u l e . e x p o r t s = t o F i n i t e } , { " . / t o N u m b e r " : 2 8 1 } ] , 2 8 0 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r t o F i n i t e = r e q u i r e ( " . / t o F i n i t e " ) ;
/ * *
* Converts ` value ` to an integer .
*
* * * Note : * * This method is loosely based on
* [ ` ToInteger ` ] ( http : //www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
*
* @ static
* @ memberOf _
* @ since 4.0 . 0
* @ category Lang
* @ param { * } value The value to convert .
* @ returns { number } Returns the converted integer .
* @ example
*
* _ . toInteger ( 3.2 ) ;
* // => 3
*
* _ . toInteger ( Number . MIN _VALUE ) ;
* // => 0
*
* _ . toInteger ( Infinity ) ;
* // => 1.7976931348623157e+308
*
* _ . toInteger ( '3.2' ) ;
* // => 3
* / f u n c t i o n t o I n t e g e r ( v a l u e ) { v a r r e s u l t = t o F i n i t e ( v a l u e ) , r e m a i n d e r = r e s u l t % 1 ; r e t u r n r e s u l t = = = r e s u l t ? r e m a i n d e r ? r e s u l t - r e m a i n d e r : r e s u l t : 0 } m o d u l e . e x p o r t s = t o I n t e g e r } , { " . / t o F i n i t e " : 2 7 9 } ] , 2 8 1 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r i s O b j e c t = r e q u i r e ( " . / i s O b j e c t " ) , i s S y m b o l = r e q u i r e ( " . / i s S y m b o l " ) ;
/** Used as references for various `Number` constants. */ var NAN = 0 / 0 ;
/** Used to match leading and trailing whitespace. */ var reTrim = /^\s+|\s+$/g ;
/** Used to detect bad signed hexadecimal string values. */ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i ;
/** Used to detect binary string values. */ var reIsBinary = /^0b[01]+$/i ;
/** Used to detect octal string values. */ var reIsOctal = /^0o[0-7]+$/i ;
/** Built-in method references without a dependency on `root`. */ var freeParseInt = parseInt ;
/ * *
* Converts ` value ` to a number .
*
* @ static
* @ memberOf _
* @ since 4.0 . 0
* @ category Lang
* @ param { * } value The value to process .
* @ returns { number } Returns the number .
* @ example
*
* _ . toNumber ( 3.2 ) ;
* // => 3.2
*
* _ . toNumber ( Number . MIN _VALUE ) ;
* // => 5e-324
*
* _ . toNumber ( Infinity ) ;
* // => Infinity
*
* _ . toNumber ( '3.2' ) ;
* // => 3.2
* / f u n c t i o n t o N u m b e r ( v a l u e ) { i f ( t y p e o f v a l u e = = " n u m b e r " ) { r e t u r n v a l u e } i f ( i s S y m b o l ( v a l u e ) ) { r e t u r n N A N } i f ( i s O b j e c t ( v a l u e ) ) { v a r o t h e r = t y p e o f v a l u e . v a l u e O f = = " f u n c t i o n " ? v a l u e . v a l u e O f ( ) : v a l u e ; v a l u e = i s O b j e c t ( o t h e r ) ? o t h e r + " " : o t h e r } i f ( t y p e o f v a l u e ! = " s t r i n g " ) { r e t u r n v a l u e = = = 0 ? v a l u e : + v a l u e } v a l u e = v a l u e . r e p l a c e ( r e T r i m , " " ) ; v a r i s B i n a r y = r e I s B i n a r y . t e s t ( v a l u e ) ; r e t u r n i s B i n a r y | | r e I s O c t a l . t e s t ( v a l u e ) ? f r e e P a r s e I n t ( v a l u e . s l i c e ( 2 ) , i s B i n a r y ? 2 : 8 ) : r e I s B a d H e x . t e s t ( v a l u e ) ? N A N : + v a l u e } m o d u l e . e x p o r t s = t o N u m b e r } , { " . / i s O b j e c t " : 2 5 1 , " . / i s S y m b o l " : 2 5 6 } ] , 2 8 2 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r c o p y O b j e c t = r e q u i r e ( " . / _ c o p y O b j e c t " ) , k e y s I n = r e q u i r e ( " . / k e y s I n " ) ;
/ * *
* Converts ` value ` to a plain object flattening inherited enumerable string
* keyed properties of ` value ` to own properties of the plain object .
*
* @ static
* @ memberOf _
* @ since 3.0 . 0
* @ category Lang
* @ param { * } value The value to convert .
* @ returns { Object } Returns the converted plain object .
* @ example
*
* function Foo ( ) {
* this . b = 2 ;
* }
*
* Foo . prototype . c = 3 ;
*
* _ . assign ( { 'a' : 1 } , new Foo ) ;
* // => { 'a': 1, 'b': 2 }
*
* _ . assign ( { 'a' : 1 } , _ . toPlainObject ( new Foo ) ) ;
* // => { 'a': 1, 'b': 2, 'c': 3 }
* / f u n c t i o n t o P l a i n O b j e c t ( v a l u e ) { r e t u r n c o p y O b j e c t ( v a l u e , k e y s I n ( v a l u e ) ) } m o d u l e . e x p o r t s = t o P l a i n O b j e c t } , { " . / _ c o p y O b j e c t " : 1 4 3 , " . / k e y s I n " : 2 6 0 } ] , 2 8 3 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r b a s e T o S t r i n g = r e q u i r e ( " . / _ b a s e T o S t r i n g " ) ;
/ * *
* Converts ` value ` to a string . An empty string is returned for ` null `
* and ` undefined ` values . The sign of ` -0 ` is preserved .
*
* @ static
* @ memberOf _
* @ since 4.0 . 0
* @ category Lang
* @ param { * } value The value to convert .
* @ returns { string } Returns the converted string .
* @ example
*
* _ . toString ( null ) ;
* // => ''
*
* _ . toString ( - 0 ) ;
* // => '-0'
*
* _ . toString ( [ 1 , 2 , 3 ] ) ;
* // => '1,2,3'
* / f u n c t i o n t o S t r i n g ( v a l u e ) { r e t u r n v a l u e = = n u l l ? " " : b a s e T o S t r i n g ( v a l u e ) } m o d u l e . e x p o r t s = t o S t r i n g } , { " . / _ b a s e T o S t r i n g " : 1 2 6 } ] , 2 8 4 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r a r r a y E a c h = r e q u i r e ( " . / _ a r r a y E a c h " ) , b a s e C r e a t e = r e q u i r e ( " . / _ b a s e C r e a t e " ) , b a s e F o r O w n = r e q u i r e ( " . / _ b a s e F o r O w n " ) , b a s e I t e r a t e e = r e q u i r e ( " . / _ b a s e I t e r a t e e " ) , g e t P r o t o t y p e = r e q u i r e ( " . / _ g e t P r o t o t y p e " ) , i s A r r a y = r e q u i r e ( " . / i s A r r a y " ) , i s B u f f e r = r e q u i r e ( " . / i s B u f f e r " ) , i s F u n c t i o n = r e q u i r e ( " . / i s F u n c t i o n " ) , i s O b j e c t = r e q u i r e ( " . / i s O b j e c t " ) , i s T y p e d A r r a y = r e q u i r e ( " . / i s T y p e d A r r a y " ) ;
/ * *
* An alternative to ` _.reduce ` ; this method transforms ` object ` to a new
* ` accumulator ` object which is the result of running each of its own
* enumerable string keyed properties thru ` iteratee ` , with each invocation
* potentially mutating the ` accumulator ` object . If ` accumulator ` is not
* provided , a new object with the same ` [[Prototype]] ` will be used . The
* iteratee is invoked with four arguments : ( accumulator , value , key , object ) .
* Iteratee functions may exit iteration early by explicitly returning ` false ` .
*
* @ static
* @ memberOf _
* @ since 1.3 . 0
* @ category Object
* @ param { Object } object The object to iterate over .
* @ param { Function } [ iteratee = _ . identity ] The function invoked per iteration .
* @ param { * } [ accumulator ] The custom accumulator value .
* @ returns { * } Returns the accumulated value .
* @ example
*
* _ . transform ( [ 2 , 3 , 4 ] , function ( result , n ) {
* result . push ( n *= n ) ;
* return n % 2 == 0 ;
* } , [ ] ) ;
* // => [4, 9]
*
* _ . transform ( { 'a' : 1 , 'b' : 2 , 'c' : 1 } , function ( result , value , key ) {
* ( result [ value ] || ( result [ value ] = [ ] ) ) . push ( key ) ;
* } , { } ) ;
* // => { '1': ['a', 'c'], '2': ['b'] }
* / f u n c t i o n t r a n s f o r m ( o b j e c t , i t e r a t e e , a c c u m u l a t o r ) { v a r i s A r r = i s A r r a y ( o b j e c t ) , i s A r r L i k e = i s A r r | | i s B u f f e r ( o b j e c t ) | | i s T y p e d A r r a y ( o b j e c t ) ; i t e r a t e e = b a s e I t e r a t e e ( i t e r a t e e , 4 ) ; i f ( a c c u m u l a t o r = = n u l l ) { v a r C t o r = o b j e c t & & o b j e c t . c o n s t r u c t o r ; i f ( i s A r r L i k e ) { a c c u m u l a t o r = i s A r r ? n e w C t o r : [ ] } e l s e i f ( i s O b j e c t ( o b j e c t ) ) { a c c u m u l a t o r = i s F u n c t i o n ( C t o r ) ? b a s e C r e a t e ( g e t P r o t o t y p e ( o b j e c t ) ) : { } } e l s e { a c c u m u l a t o r = { } } } ( i s A r r L i k e ? a r r a y E a c h : b a s e F o r O w n ) ( o b j e c t , f u n c t i o n ( v a l u e , i n d e x , o b j e c t ) { r e t u r n i t e r a t e e ( a c c u m u l a t o r , v a l u e , i n d e x , o b j e c t ) } ) ; r e t u r n a c c u m u l a t o r } m o d u l e . e x p o r t s = t r a n s f o r m } , { " . / _ a r r a y E a c h " : 6 4 , " . / _ b a s e C r e a t e " : 8 1 , " . / _ b a s e F o r O w n " : 8 8 , " . / _ b a s e I t e r a t e e " : 1 0 5 , " . / _ g e t P r o t o t y p e " : 1 6 4 , " . / i s A r r a y " : 2 4 3 , " . / i s B u f f e r " : 2 4 6 , " . / i s F u n c t i o n " : 2 4 8 , " . / i s O b j e c t " : 2 5 1 , " . / i s T y p e d A r r a y " : 2 5 7 } ] , 2 8 5 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r b a s e F l a t t e n = r e q u i r e ( " . / _ b a s e F l a t t e n " ) , b a s e R e s t = r e q u i r e ( " . / _ b a s e R e s t " ) , b a s e U n i q = r e q u i r e ( " . / _ b a s e U n i q " ) , i s A r r a y L i k e O b j e c t = r e q u i r e ( " . / i s A r r a y L i k e O b j e c t " ) ;
/ * *
* Creates an array of unique values , in order , from all given arrays using
* [ ` SameValueZero ` ] ( http : //ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* for equality comparisons .
*
* @ static
* @ memberOf _
* @ since 0.1 . 0
* @ category Array
* @ param { ... Array } [ arrays ] The arrays to inspect .
* @ returns { Array } Returns the new array of combined values .
* @ example
*
* _ . union ( [ 2 ] , [ 1 , 2 ] ) ;
* // => [2, 1]
* / v a r u n i o n = b a s e R e s t ( f u n c t i o n ( a r r a y s ) { r e t u r n b a s e U n i q ( b a s e F l a t t e n ( a r r a y s , 1 , i s A r r a y L i k e O b j e c t , t r u e ) ) } ) ; m o d u l e . e x p o r t s = u n i o n } , { " . / _ b a s e F l a t t e n " : 8 6 , " . / _ b a s e R e s t " : 1 2 1 , " . / _ b a s e U n i q " : 1 2 8 , " . / i s A r r a y L i k e O b j e c t " : 2 4 5 } ] , 2 8 6 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r t o S t r i n g = r e q u i r e ( " . / t o S t r i n g " ) ;
/** Used to generate unique IDs. */ var idCounter = 0 ;
/ * *
* Generates a unique ID . If ` prefix ` is given , the ID is appended to it .
*
* @ static
* @ since 0.1 . 0
* @ memberOf _
* @ category Util
* @ param { string } [ prefix = '' ] The value to prefix the ID with .
* @ returns { string } Returns the unique ID .
* @ example
*
* _ . uniqueId ( 'contact_' ) ;
* // => 'contact_104'
*
* _ . uniqueId ( ) ;
* // => '105'
* / f u n c t i o n u n i q u e I d ( p r e f i x ) { v a r i d = + + i d C o u n t e r ; r e t u r n t o S t r i n g ( p r e f i x ) + i d } m o d u l e . e x p o r t s = u n i q u e I d } , { " . / t o S t r i n g " : 2 8 3 } ] , 2 8 7 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r b a s e V a l u e s = r e q u i r e ( " . / _ b a s e V a l u e s " ) , k e y s = r e q u i r e ( " . / k e y s " ) ;
/ * *
* Creates an array of the own enumerable string keyed property values of ` object ` .
*
* * * Note : * * Non - object values are coerced to objects .
*
* @ static
* @ since 0.1 . 0
* @ memberOf _
* @ category Object
* @ param { Object } object The object to query .
* @ returns { Array } Returns the array of property values .
* @ example
*
* function Foo ( ) {
* this . a = 1 ;
* this . b = 2 ;
* }
*
* Foo . prototype . c = 3 ;
*
* _ . values ( new Foo ) ;
* // => [1, 2] (iteration order is not guaranteed)
*
* _ . values ( 'hi' ) ;
* // => ['h', 'i']
* / f u n c t i o n v a l u e s ( o b j e c t ) { r e t u r n o b j e c t = = n u l l ? [ ] : b a s e V a l u e s ( o b j e c t , k e y s ( o b j e c t ) ) } m o d u l e . e x p o r t s = v a l u e s } , { " . / _ b a s e V a l u e s " : 1 2 9 , " . / k e y s " : 2 5 9 } ] , 2 8 8 : [ f u n c t i o n ( r e q u i r e , m o d u l e , e x p o r t s ) { v a r a s s i g n V a l u e = r e q u i r e ( " . / _ a s s i g n V a l u e " ) , b a s e Z i p O b j e c t = r e q u i r e ( " . / _ b a s e Z i p O b j e c t " ) ;
/ * *
* This method is like ` _.fromPairs ` except that it accepts two arrays ,
* one of property identifiers and one of corresponding values .
*
* @ static
* @ memberOf _
* @ since 0.4 . 0
* @ category Array
* @ param { Array } [ props = [ ] ] The property identifiers .
* @ param { Array } [ values = [ ] ] The property values .
* @ returns { Object } Returns the new object .
* @ example
*
* _ . zipObject ( [ 'a' , 'b' ] , [ 1 , 2 ] ) ;
* // => { 'a': 1, 'b': 2 }
* / f u n c t i o n z i p O b j e c t ( p r o p s , v a l u e s ) { r e t u r n b a s e Z i p O b j e c t ( p r o p s | | [ ] , v a l u e s | | [ ] , a s s i g n V a l u e ) } m o d u l e . e x p o r t s = z i p O b j e c t } , { " . / _ a s s i g n V a l u e " : 7 5 , " . / _ b a s e Z i p O b j e c t " : 1 3 0 } ] } , { } , [ 1 ] ) ( 1 ) } ) ;