1+ /*[process-shim]*/
2+ ( function ( global , env ) {
3+ // jshint ignore:line
4+ if ( typeof process === "undefined" ) {
5+ global . process = {
6+ argv : [ ] ,
7+ cwd : function ( ) {
8+ return "" ;
9+ } ,
10+ browser : true ,
11+ env : {
12+ NODE_ENV : env || "development"
13+ } ,
14+ version : "" ,
15+ platform :
16+ global . navigator &&
17+ global . navigator . userAgent &&
18+ / W i n d o w s / . test ( global . navigator . userAgent )
19+ ? "win"
20+ : ""
21+ } ;
22+ }
23+ } ) (
24+ typeof self == "object" && self . Object == Object
25+ ? self
26+ : typeof process === "object" &&
27+ Object . prototype . toString . call ( process ) === "[object process]"
28+ ? global
29+ : window ,
30+ "development"
31+ ) ;
32+
33+ /*[global-shim-start]*/
34+ ( function ( exports , global , doEval ) {
35+ // jshint ignore:line
36+ var origDefine = global . define ;
37+
38+ var get = function ( name ) {
39+ var parts = name . split ( "." ) ,
40+ cur = global ,
41+ i ;
42+ for ( i = 0 ; i < parts . length ; i ++ ) {
43+ if ( ! cur ) {
44+ break ;
45+ }
46+ cur = cur [ parts [ i ] ] ;
47+ }
48+ return cur ;
49+ } ;
50+ var set = function ( name , val ) {
51+ var parts = name . split ( "." ) ,
52+ cur = global ,
53+ i ,
54+ part ,
55+ next ;
56+ for ( i = 0 ; i < parts . length - 1 ; i ++ ) {
57+ part = parts [ i ] ;
58+ next = cur [ part ] ;
59+ if ( ! next ) {
60+ next = cur [ part ] = { } ;
61+ }
62+ cur = next ;
63+ }
64+ part = parts [ parts . length - 1 ] ;
65+ cur [ part ] = val ;
66+ } ;
67+ var useDefault = function ( mod ) {
68+ if ( ! mod || ! mod . __esModule ) return false ;
69+ var esProps = { __esModule : true , default : true } ;
70+ for ( var p in mod ) {
71+ if ( ! esProps [ p ] ) return false ;
72+ }
73+ return true ;
74+ } ;
75+
76+ var hasCjsDependencies = function ( deps ) {
77+ return (
78+ deps [ 0 ] === "require" && deps [ 1 ] === "exports" && deps [ 2 ] === "module"
79+ ) ;
80+ } ;
81+
82+ var modules =
83+ ( global . define && global . define . modules ) ||
84+ ( global . _define && global . _define . modules ) ||
85+ { } ;
86+ var ourDefine = ( global . define = function ( moduleName , deps , callback ) {
87+ var module ;
88+ if ( typeof deps === "function" ) {
89+ callback = deps ;
90+ deps = [ ] ;
91+ }
92+ var args = [ ] ,
93+ i ;
94+ for ( i = 0 ; i < deps . length ; i ++ ) {
95+ args . push (
96+ exports [ deps [ i ] ]
97+ ? get ( exports [ deps [ i ] ] )
98+ : modules [ deps [ i ] ] || get ( deps [ i ] )
99+ ) ;
100+ }
101+ // CJS has no dependencies but 3 callback arguments
102+ if ( hasCjsDependencies ( deps ) || ( ! deps . length && callback . length ) ) {
103+ module = { exports : { } } ;
104+ args [ 0 ] = function ( name ) {
105+ return exports [ name ] ? get ( exports [ name ] ) : modules [ name ] ;
106+ } ;
107+ args [ 1 ] = module . exports ;
108+ args [ 2 ] = module ;
109+ } else if ( ! args [ 0 ] && deps [ 0 ] === "exports" ) {
110+ // Babel uses the exports and module object.
111+ module = { exports : { } } ;
112+ args [ 0 ] = module . exports ;
113+ if ( deps [ 1 ] === "module" ) {
114+ args [ 1 ] = module ;
115+ }
116+ } else if ( ! args [ 0 ] && deps [ 0 ] === "module" ) {
117+ args [ 0 ] = { id : moduleName } ;
118+ }
119+
120+ global . define = origDefine ;
121+ var result = callback ? callback . apply ( null , args ) : undefined ;
122+ global . define = ourDefine ;
123+
124+ // Favor CJS module.exports over the return value
125+ result = module && module . exports ? module . exports : result ;
126+ modules [ moduleName ] = result ;
127+
128+ // Set global exports
129+ var globalExport = exports [ moduleName ] ;
130+ if ( globalExport && ! get ( globalExport ) ) {
131+ if ( useDefault ( result ) ) {
132+ result = result [ "default" ] ;
133+ }
134+ set ( globalExport , result ) ;
135+ }
136+ } ) ;
137+ global . define . orig = origDefine ;
138+ global . define . modules = modules ;
139+ global . define . amd = true ;
140+ ourDefine ( "@loader" , [ ] , function ( ) {
141+ // shim for @@global -helpers
142+ var noop = function ( ) { } ;
143+ return {
144+ get : function ( ) {
145+ return { prepareGlobal : noop , retrieveGlobal : noop } ;
146+ } ,
147+ global : global ,
148+ __exec : function ( __load ) {
149+ doEval ( __load . source , global ) ;
150+ }
151+ } ;
152+ } ) ;
153+ } ) (
154+ { } ,
155+ typeof self == "object" && self . Object == Object
156+ ? self
157+ : typeof process === "object" &&
158+ Object . prototype . toString . call ( process ) === "[object process]"
159+ ? global
160+ : window ,
161+ function ( __$source__ , __$global__ ) {
162+ // jshint ignore:line
163+ eval ( "(function() { " + __$source__ + " \n }).call(__$global__);" ) ;
164+ }
165+ ) ;
166+
167+ /*can-react-component@0.1.11#can-react-component*/
168+ define ( 'can-react-component' , [
169+ 'require' ,
170+ 'exports' ,
171+ 'module' ,
172+ 'react' ,
173+ 'can-view-scope' ,
174+ 'can-assign' ,
175+ 'can-namespace'
176+ ] , function ( require , exports , module ) {
177+ var React = require ( 'react' ) ;
178+ var Scope = require ( 'can-view-scope' ) ;
179+ var assign = require ( 'can-assign' ) ;
180+ var namespace = require ( 'can-namespace' ) ;
181+ module . exports = namespace . reactComponent = function canReactComponent ( displayName , CanComponent ) {
182+ if ( arguments . length === 1 ) {
183+ CanComponent = arguments [ 0 ] ;
184+ displayName = ( CanComponent . shortName || 'CanComponent' ) + 'Wrapper' ;
185+ }
186+ function Wrapper ( ) {
187+ React . Component . call ( this ) ;
188+ this . canComponent = null ;
189+ this . createComponent = this . createComponent . bind ( this ) ;
190+ }
191+ Wrapper . displayName = displayName ;
192+ Wrapper . prototype = Object . create ( React . Component . prototype ) ;
193+ assign ( Wrapper . prototype , {
194+ constructor : Wrapper ,
195+ createComponent : function ( el ) {
196+ if ( this . canComponent ) {
197+ this . canComponent = null ;
198+ }
199+ if ( el ) {
200+ this . canComponent = new CanComponent ( el , {
201+ subtemplate : null ,
202+ templateType : 'react' ,
203+ parentNodeList : undefined ,
204+ options : Scope . refsScope ( ) . add ( { } ) ,
205+ scope : new Scope . Options ( { } ) ,
206+ setupBindings : function ( el , makeViewModel , initialViewModelData ) {
207+ assign ( initialViewModelData , this . props ) ;
208+ makeViewModel ( initialViewModelData ) ;
209+ } . bind ( this )
210+ } ) ;
211+ }
212+ } ,
213+ componentWillUpdate : function ( props ) {
214+ this . canComponent . viewModel . assign ( props ) ;
215+ } ,
216+ render : function ( ) {
217+ return React . createElement ( CanComponent . prototype . tag , { ref : this . createComponent } ) ;
218+ }
219+ } ) ;
220+ Object . defineProperty ( Wrapper . prototype , 'viewModel' , {
221+ enumerable : false ,
222+ configurable : true ,
223+ get : function ( ) {
224+ return this . canComponent && this . canComponent . viewModel ;
225+ }
226+ } ) ;
227+ try {
228+ Object . defineProperty ( Wrapper , 'name' , {
229+ writable : false ,
230+ enumerable : false ,
231+ configurable : true ,
232+ value : displayName
233+ } ) ;
234+ } catch ( e ) {
235+ }
236+ return Wrapper ;
237+ } ;
238+ } ) ;
239+ /*[global-shim-end]*/
240+ ( function ( global ) { // jshint ignore:line
241+ global . _define = global . define ;
242+ global . define = global . define . orig ;
243+ }
244+ ) ( typeof self == "object" && self . Object == Object ? self : ( typeof process === "object" && Object . prototype . toString . call ( process ) === "[object process]" ) ? global : window ) ;
0 commit comments