1
+ /******/ ( function ( modules ) { // webpackBootstrap
2
+ /******/ // The module cache
3
+ /******/ var installedModules = { } ;
4
+ /******/
5
+ /******/ // The require function
6
+ /******/ function __webpack_require__ ( moduleId ) {
7
+ /******/
8
+ /******/ // Check if module is in cache
9
+ /******/ if ( installedModules [ moduleId ] ) {
10
+ /******/ return installedModules [ moduleId ] . exports ;
11
+ /******/ }
12
+ /******/ // Create a new module (and put it into the cache)
13
+ /******/ var module = installedModules [ moduleId ] = {
14
+ /******/ i : moduleId ,
15
+ /******/ l : false ,
16
+ /******/ exports : { }
17
+ /******/ } ;
18
+ /******/
19
+ /******/ // Execute the module function
20
+ /******/ modules [ moduleId ] . call ( module . exports , module , module . exports , __webpack_require__ ) ;
21
+ /******/
22
+ /******/ // Flag the module as loaded
23
+ /******/ module . l = true ;
24
+ /******/
25
+ /******/ // Return the exports of the module
26
+ /******/ return module . exports ;
27
+ /******/ }
28
+ /******/
29
+ /******/
30
+ /******/ // expose the modules object (__webpack_modules__)
31
+ /******/ __webpack_require__ . m = modules ;
32
+ /******/
33
+ /******/ // expose the module cache
34
+ /******/ __webpack_require__ . c = installedModules ;
35
+ /******/
36
+ /******/ // define getter function for harmony exports
37
+ /******/ __webpack_require__ . d = function ( exports , name , getter ) {
38
+ /******/ if ( ! __webpack_require__ . o ( exports , name ) ) {
39
+ /******/ Object . defineProperty ( exports , name , {
40
+ /******/ configurable : false ,
41
+ /******/ enumerable : true ,
42
+ /******/ get : getter
43
+ /******/ } ) ;
44
+ /******/ }
45
+ /******/ } ;
46
+ /******/
47
+ /******/ // define __esModule on exports
48
+ /******/ __webpack_require__ . r = function ( exports ) {
49
+ /******/ Object . defineProperty ( exports , '__esModule' , { value : true } ) ;
50
+ /******/ } ;
51
+ /******/
52
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
53
+ /******/ __webpack_require__ . n = function ( module ) {
54
+ /******/ var getter = module && module . __esModule ?
55
+ /******/ function getDefault ( ) { return module [ 'default' ] ; } :
56
+ /******/ function getModuleExports ( ) { return module ; } ;
57
+ /******/ __webpack_require__ . d ( getter , 'a' , getter ) ;
58
+ /******/ return getter ;
59
+ /******/ } ;
60
+ /******/
61
+ /******/ // Object.prototype.hasOwnProperty.call
62
+ /******/ __webpack_require__ . o = function ( object , property ) { return Object . prototype . hasOwnProperty . call ( object , property ) ; } ;
63
+ /******/
64
+ /******/ // __webpack_public_path__
65
+ /******/ __webpack_require__ . p = "" ;
66
+ /******/
67
+ /******/
68
+ /******/ // Load entry module and return exports
69
+ /******/ return __webpack_require__ ( __webpack_require__ . s = 3 ) ;
70
+ /******/ } )
71
+ /************************************************************************/
72
+ /******/ ( [
73
+ /* 0 */
74
+ /***/ ( function ( module , exports ) {
75
+
76
+ /* (ignored) */
77
+
78
+ /***/ } ) ,
79
+ /* 1 */
80
+ /***/ ( function ( module , exports , __webpack_require__ ) {
81
+
82
+ "use strict" ;
83
+
84
+
85
+ var pug_has_own_property = Object . prototype . hasOwnProperty ;
86
+
87
+ /**
88
+ * Merge two attribute objects giving precedence
89
+ * to values in object `b`. Classes are special-cased
90
+ * allowing for arrays and merging/joining appropriately
91
+ * resulting in a string.
92
+ *
93
+ * @param {Object } a
94
+ * @param {Object } b
95
+ * @return {Object } a
96
+ * @api private
97
+ */
98
+
99
+ exports . merge = pug_merge ;
100
+ function pug_merge ( a , b ) {
101
+ if ( arguments . length === 1 ) {
102
+ var attrs = a [ 0 ] ;
103
+ for ( var i = 1 ; i < a . length ; i ++ ) {
104
+ attrs = pug_merge ( attrs , a [ i ] ) ;
105
+ }
106
+ return attrs ;
107
+ }
108
+
109
+ for ( var key in b ) {
110
+ if ( key === 'class' ) {
111
+ var valA = a [ key ] || [ ] ;
112
+ a [ key ] = ( Array . isArray ( valA ) ? valA : [ valA ] ) . concat ( b [ key ] || [ ] ) ;
113
+ } else if ( key === 'style' ) {
114
+ var valA = pug_style ( a [ key ] ) ;
115
+ valA = valA && valA [ valA . length - 1 ] !== ';' ? valA + ';' : valA ;
116
+ var valB = pug_style ( b [ key ] ) ;
117
+ valB = valB && valB [ valB . length - 1 ] !== ';' ? valB + ';' : valB ;
118
+ a [ key ] = valA + valB ;
119
+ } else {
120
+ a [ key ] = b [ key ] ;
121
+ }
122
+ }
123
+
124
+ return a ;
125
+ } ;
126
+
127
+ /**
128
+ * Process array, object, or string as a string of classes delimited by a space.
129
+ *
130
+ * If `val` is an array, all members of it and its subarrays are counted as
131
+ * classes. If `escaping` is an array, then whether or not the item in `val` is
132
+ * escaped depends on the corresponding item in `escaping`. If `escaping` is
133
+ * not an array, no escaping is done.
134
+ *
135
+ * If `val` is an object, all the keys whose value is truthy are counted as
136
+ * classes. No escaping is done.
137
+ *
138
+ * If `val` is a string, it is counted as a class. No escaping is done.
139
+ *
140
+ * @param {(Array.<string>|Object.<string, boolean>|string) } val
141
+ * @param {?Array.<string> } escaping
142
+ * @return {String }
143
+ */
144
+ exports . classes = pug_classes ;
145
+ function pug_classes_array ( val , escaping ) {
146
+ var classString = '' , className , padding = '' , escapeEnabled = Array . isArray ( escaping ) ;
147
+ for ( var i = 0 ; i < val . length ; i ++ ) {
148
+ className = pug_classes ( val [ i ] ) ;
149
+ if ( ! className ) continue ;
150
+ escapeEnabled && escaping [ i ] && ( className = pug_escape ( className ) ) ;
151
+ classString = classString + padding + className ;
152
+ padding = ' ' ;
153
+ }
154
+ return classString ;
155
+ }
156
+ function pug_classes_object ( val ) {
157
+ var classString = '' , padding = '' ;
158
+ for ( var key in val ) {
159
+ if ( key && val [ key ] && pug_has_own_property . call ( val , key ) ) {
160
+ classString = classString + padding + key ;
161
+ padding = ' ' ;
162
+ }
163
+ }
164
+ return classString ;
165
+ }
166
+ function pug_classes ( val , escaping ) {
167
+ if ( Array . isArray ( val ) ) {
168
+ return pug_classes_array ( val , escaping ) ;
169
+ } else if ( val && typeof val === 'object' ) {
170
+ return pug_classes_object ( val ) ;
171
+ } else {
172
+ return val || '' ;
173
+ }
174
+ }
175
+
176
+ /**
177
+ * Convert object or string to a string of CSS styles delimited by a semicolon.
178
+ *
179
+ * @param {(Object.<string, string>|string) } val
180
+ * @return {String }
181
+ */
182
+
183
+ exports . style = pug_style ;
184
+ function pug_style ( val ) {
185
+ if ( ! val ) return '' ;
186
+ if ( typeof val === 'object' ) {
187
+ var out = '' ;
188
+ for ( var style in val ) {
189
+ /* istanbul ignore else */
190
+ if ( pug_has_own_property . call ( val , style ) ) {
191
+ out = out + style + ':' + val [ style ] + ';' ;
192
+ }
193
+ }
194
+ return out ;
195
+ } else {
196
+ return val + '' ;
197
+ }
198
+ } ;
199
+
200
+ /**
201
+ * Render the given attribute.
202
+ *
203
+ * @param {String } key
204
+ * @param {String } val
205
+ * @param {Boolean } escaped
206
+ * @param {Boolean } terse
207
+ * @return {String }
208
+ */
209
+ exports . attr = pug_attr ;
210
+ function pug_attr ( key , val , escaped , terse ) {
211
+ if ( val === false || val == null || ! val && ( key === 'class' || key === 'style' ) ) {
212
+ return '' ;
213
+ }
214
+ if ( val === true ) {
215
+ return ' ' + ( terse ? key : key + '="' + key + '"' ) ;
216
+ }
217
+ if ( typeof val . toJSON === 'function' ) {
218
+ val = val . toJSON ( ) ;
219
+ }
220
+ if ( typeof val !== 'string' ) {
221
+ val = JSON . stringify ( val ) ;
222
+ if ( ! escaped && val . indexOf ( '"' ) !== - 1 ) {
223
+ return ' ' + key + '=\'' + val . replace ( / ' / g, ''' ) + '\'' ;
224
+ }
225
+ }
226
+ if ( escaped ) val = pug_escape ( val ) ;
227
+ return ' ' + key + '="' + val + '"' ;
228
+ } ;
229
+
230
+ /**
231
+ * Render the given attributes object.
232
+ *
233
+ * @param {Object } obj
234
+ * @param {Object } terse whether to use HTML5 terse boolean attributes
235
+ * @return {String }
236
+ */
237
+ exports . attrs = pug_attrs ;
238
+ function pug_attrs ( obj , terse ) {
239
+ var attrs = '' ;
240
+
241
+ for ( var key in obj ) {
242
+ if ( pug_has_own_property . call ( obj , key ) ) {
243
+ var val = obj [ key ] ;
244
+
245
+ if ( 'class' === key ) {
246
+ val = pug_classes ( val ) ;
247
+ attrs = pug_attr ( key , val , false , terse ) + attrs ;
248
+ continue ;
249
+ }
250
+ if ( 'style' === key ) {
251
+ val = pug_style ( val ) ;
252
+ }
253
+ attrs += pug_attr ( key , val , false , terse ) ;
254
+ }
255
+ }
256
+
257
+ return attrs ;
258
+ } ;
259
+
260
+ /**
261
+ * Escape the given string of `html`.
262
+ *
263
+ * @param {String } html
264
+ * @return {String }
265
+ * @api private
266
+ */
267
+
268
+ var pug_match_html = / [ " & < > ] / ;
269
+ exports . escape = pug_escape ;
270
+ function pug_escape ( _html ) {
271
+ var html = '' + _html ;
272
+ var regexResult = pug_match_html . exec ( html ) ;
273
+ if ( ! regexResult ) return _html ;
274
+
275
+ var result = '' ;
276
+ var i , lastIndex , escape ;
277
+ for ( i = regexResult . index , lastIndex = 0 ; i < html . length ; i ++ ) {
278
+ switch ( html . charCodeAt ( i ) ) {
279
+ case 34 : escape = '"' ; break ;
280
+ case 38 : escape = '&' ; break ;
281
+ case 60 : escape = '<' ; break ;
282
+ case 62 : escape = '>' ; break ;
283
+ default : continue ;
284
+ }
285
+ if ( lastIndex !== i ) result += html . substring ( lastIndex , i ) ;
286
+ lastIndex = i + 1 ;
287
+ result += escape ;
288
+ }
289
+ if ( lastIndex !== i ) return result + html . substring ( lastIndex , i ) ;
290
+ else return result ;
291
+ } ;
292
+
293
+ /**
294
+ * Re-throw the given `err` in context to the
295
+ * the pug in `filename` at the given `lineno`.
296
+ *
297
+ * @param {Error } err
298
+ * @param {String } filename
299
+ * @param {String } lineno
300
+ * @param {String } str original source
301
+ * @api private
302
+ */
303
+
304
+ exports . rethrow = pug_rethrow ;
305
+ function pug_rethrow ( err , filename , lineno , str ) {
306
+ if ( ! ( err instanceof Error ) ) throw err ;
307
+ if ( ( typeof window != 'undefined' || ! filename ) && ! str ) {
308
+ err . message += ' on line ' + lineno ;
309
+ throw err ;
310
+ }
311
+ try {
312
+ str = str || __webpack_require__ ( 0 ) . readFileSync ( filename , 'utf8' )
313
+ } catch ( ex ) {
314
+ pug_rethrow ( err , null , lineno )
315
+ }
316
+ var context = 3
317
+ , lines = str . split ( '\n' )
318
+ , start = Math . max ( lineno - context , 0 )
319
+ , end = Math . min ( lines . length , lineno + context ) ;
320
+
321
+ // Error context
322
+ var context = lines . slice ( start , end ) . map ( function ( line , i ) {
323
+ var curr = i + start + 1 ;
324
+ return ( curr == lineno ? ' > ' : ' ' )
325
+ + curr
326
+ + '| '
327
+ + line ;
328
+ } ) . join ( '\n' ) ;
329
+
330
+ // Alter exception message
331
+ err . path = filename ;
332
+ err . message = ( filename || 'Pug' ) + ':' + lineno
333
+ + '\n' + context + '\n\n' + err . message ;
334
+ throw err ;
335
+ } ;
336
+
337
+
338
+ /***/ } ) ,
339
+ /* 2 */
340
+ /***/ ( function ( module , exports , __webpack_require__ ) {
341
+
342
+ var pug = __webpack_require__ ( 1 ) ;
343
+
344
+ function template ( locals ) { var pug_html = "" , pug_mixins = { } , pug_interp ; ; var locals_for_with = ( locals || { } ) ; ( function ( time ) { pug_html = pug_html + "\u003C!-- this partial is used for frontend and backend--\u003E\u003Cdiv class=\"time\"\u003E \u003Cb\u003ECurrent time\u003C\u002Fb\u003E\u003Cp\u003E" + ( pug . escape ( null == ( pug_interp = time . toISOString ( ) ) ? "" : pug_interp ) ) + "\u003C\u002Fp\u003E\u003C\u002Fdiv\u003E\u003Cimg src=\"#{require('.\u002Flogo.png')}\"\u003E" ; } . call ( this , "time" in locals_for_with ?locals_for_with . time :typeof time !== "undefined" ?time :undefined ) ) ; ; return pug_html ; } ;
345
+ module . exports = template ;
346
+
347
+ /***/ } ) ,
348
+ /* 3 */
349
+ /***/ ( function ( module , exports , __webpack_require__ ) {
350
+
351
+ "use strict" ;
352
+
353
+ __webpack_require__ ( 7 ) ;
354
+ // Use the same template for the frontend code
355
+ var template = __webpack_require__ ( 2 ) ;
356
+
357
+ setInterval ( function ( ) {
358
+ var div = document . getElementById ( 'main' ) ;
359
+ div . innerHTML = template ( { time : new Date ( ) } ) ;
360
+ div . style . color = 'navy' ;
361
+ } , 1000 ) ;
362
+
363
+
364
+ /***/ } ) ,
365
+ /* 4 */ ,
366
+ /* 5 */ ,
367
+ /* 6 */ ,
368
+ /* 7 */
369
+ /***/ ( function ( module , exports ) {
370
+
371
+ // removed by extract-text-webpack-plugin
372
+
373
+ /***/ } )
374
+ /******/ ] ) ;
0 commit comments