8
0

imageengine.js 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578
  1. /**
  2. * @license Copyright (c) 2003-2018, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. import VirtualTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/virtualtesteditor';
  6. import ImageEngine from '../../src/image/imageengine';
  7. import { getData as getModelData, setData as setModelData } from '@ckeditor/ckeditor5-engine/src/dev-utils/model';
  8. import { getData as getViewData } from '@ckeditor/ckeditor5-engine/src/dev-utils/view';
  9. import buildViewConverter from '@ckeditor/ckeditor5-engine/src/conversion/buildviewconverter';
  10. import buildModelConverter from '@ckeditor/ckeditor5-engine/src/conversion/buildmodelconverter';
  11. import { isImageWidget } from '../../src/image/utils';
  12. import normalizeHtml from '@ckeditor/ckeditor5-utils/tests/_utils/normalizehtml';
  13. describe( 'ImageEngine', () => {
  14. let editor, model, document, viewDocument;
  15. beforeEach( () => {
  16. return VirtualTestEditor
  17. .create( {
  18. plugins: [ ImageEngine ]
  19. } )
  20. .then( newEditor => {
  21. editor = newEditor;
  22. model = editor.model;
  23. document = model.document;
  24. viewDocument = editor.editing.view;
  25. } );
  26. } );
  27. it( 'should be loaded', () => {
  28. expect( editor.plugins.get( ImageEngine ) ).to.be.instanceOf( ImageEngine );
  29. } );
  30. it( 'should set proper schema rules', () => {
  31. expect( model.schema.checkChild( [ '$root' ], 'image' ) ).to.be.true;
  32. expect( model.schema.checkAttribute( [ '$root', 'image' ], 'src' ) ).to.be.true;
  33. expect( model.schema.checkAttribute( [ '$root', 'image' ], 'alt' ) ).to.be.true;
  34. expect( model.schema.isObject( 'image' ) ).to.be.true;
  35. expect( model.schema.checkChild( [ '$root', 'image' ], 'image' ) ).to.be.false;
  36. expect( model.schema.checkChild( [ '$root', 'image' ], '$text' ) ).to.be.false;
  37. expect( model.schema.checkChild( [ '$root', '$block' ], 'image' ) ).to.be.false;
  38. } );
  39. describe( 'conversion in data pipeline', () => {
  40. describe( 'model to view', () => {
  41. it( 'should convert', () => {
  42. setModelData( model, '<image src="foo.png" alt="alt text"></image>' );
  43. expect( editor.getData() ).to.equal( '<figure class="image"><img alt="alt text" src="foo.png"></figure>' );
  44. } );
  45. it( 'should convert without alt attribute', () => {
  46. setModelData( model, '<image src="foo.png"></image>' );
  47. expect( editor.getData() ).to.equal( '<figure class="image"><img src="foo.png"></figure>' );
  48. } );
  49. it( 'should convert srcset attribute to srcset and sizes attribute', () => {
  50. setModelData( model,
  51. '<image src="foo.png" alt="alt text" srcset=\'{ "data": "small.png 148w, big.png 1024w" }\'></image>'
  52. );
  53. expect( normalizeHtml( editor.getData() ) ).to.equal(
  54. '<figure class="image">' +
  55. '<img alt="alt text" sizes="100vw" src="foo.png" srcset="small.png 148w, big.png 1024w"></img>' +
  56. '</figure>'
  57. );
  58. } );
  59. it( 'should convert srcset attribute to width, srcset and add sizes attribute', () => {
  60. setModelData( model,
  61. '<image ' +
  62. 'src="foo.png" ' +
  63. 'alt="alt text" ' +
  64. 'srcset=\'{ "data": "small.png 148w, big.png 1024w", "width": "1024" }\'>' +
  65. '</image>'
  66. );
  67. expect( normalizeHtml( editor.getData() ) ).to.equal(
  68. '<figure class="image">' +
  69. '<img alt="alt text" sizes="100vw" src="foo.png" srcset="small.png 148w, big.png 1024w" width="1024"></img>' +
  70. '</figure>'
  71. );
  72. } );
  73. it( 'should not convert srcset attribute if is already consumed', () => {
  74. editor.data.modelToView.on( 'attribute:srcset:image', ( evt, data, consumable ) => {
  75. const modelImage = data.item;
  76. consumable.consume( modelImage, evt.name );
  77. }, { priority: 'high' } );
  78. setModelData( model,
  79. '<image ' +
  80. 'src="foo.png" ' +
  81. 'alt="alt text" ' +
  82. 'srcset=\'{ "data": "small.png 148w, big.png 1024w", "width": "1024" }\'>' +
  83. '</image>'
  84. );
  85. expect( editor.getData() ).to.equal(
  86. '<figure class="image">' +
  87. '<img alt="alt text" src="foo.png">' +
  88. '</figure>'
  89. );
  90. } );
  91. it( 'should not convert srcset attribute if has wrong data', () => {
  92. setModelData( model,
  93. '<image ' +
  94. 'src="foo.png" ' +
  95. 'alt="alt text" ' +
  96. 'srcset=\'{ "foo":"bar" }\'>' +
  97. '</image>' );
  98. const image = document.getRoot().getChild( 0 );
  99. model.change( writer => {
  100. writer.removeAttribute( 'srcset', image );
  101. } );
  102. expect( editor.getData() ).to.equal(
  103. '<figure class="image">' +
  104. '<img alt="alt text" src="foo.png">' +
  105. '</figure>'
  106. );
  107. } );
  108. } );
  109. describe( 'view to model', () => {
  110. it( 'should convert image figure', () => {
  111. editor.setData( '<figure class="image"><img src="foo.png" alt="alt text" /></figure>' );
  112. expect( getModelData( model, { withoutSelection: true } ) )
  113. .to.equal( '<image alt="alt text" src="foo.png"></image>' );
  114. } );
  115. it( 'should not convert if there is no image class', () => {
  116. editor.setData( '<figure class="quote">My quote</figure>' );
  117. expect( getModelData( model, { withoutSelection: true } ) )
  118. .to.equal( '' );
  119. } );
  120. it( 'should not convert if there is no img inside #1', () => {
  121. editor.setData( '<figure class="image"></figure>' );
  122. expect( getModelData( model, { withoutSelection: true } ) )
  123. .to.equal( '' );
  124. } );
  125. it( 'should not convert if there is no img inside #2', () => {
  126. editor.setData( '<figure class="image">test</figure>' );
  127. expect( getModelData( model, { withoutSelection: true } ) )
  128. .to.equal( '' );
  129. } );
  130. it( 'should convert without alt attribute', () => {
  131. editor.setData( '<figure class="image"><img src="foo.png" /></figure>' );
  132. expect( getModelData( model, { withoutSelection: true } ) )
  133. .to.equal( '<image src="foo.png"></image>' );
  134. } );
  135. it( 'should not convert without src attribute', () => {
  136. editor.setData( '<figure class="image"><img alt="alt text" /></figure>' );
  137. expect( getModelData( model, { withoutSelection: true } ) )
  138. .to.equal( '' );
  139. } );
  140. it( 'should not convert in wrong context', () => {
  141. const data = editor.data;
  142. const editing = editor.editing;
  143. model.schema.register( 'div', { inheritAllFrom: '$block' } );
  144. model.schema.addChildCheck( ( ctx, childDef ) => {
  145. if ( ctx.endsWith( '$root' ) && childDef.name == 'image' ) {
  146. return false;
  147. }
  148. } );
  149. buildModelConverter().for( data.modelToView, editing.modelToView ).fromElement( 'div' ).toElement( 'div' );
  150. buildViewConverter().for( data.viewToModel ).fromElement( 'div' ).toElement( 'div' );
  151. editor.setData( '<div><figure class="image"><img src="foo.png" alt="alt text" /></figure></div>' );
  152. expect( getModelData( model, { withoutSelection: true } ) )
  153. .to.equal( '<div></div>' );
  154. } );
  155. it( 'should not convert if img is already consumed', () => {
  156. editor.data.viewToModel.on( 'element:figure', ( evt, data, consumable ) => {
  157. const img = data.input.getChild( 0 );
  158. consumable.consume( img, { name: true } );
  159. }, { priority: 'high' } );
  160. editor.setData( '<figure class="image"><img src="foo.png" alt="alt text" /></figure>' );
  161. expect( getModelData( model, { withoutSelection: true } ) )
  162. .to.equal( '' );
  163. } );
  164. it( 'should not convert if figure is already consumed', () => {
  165. editor.data.viewToModel.on( 'element:figure', ( evt, data, consumable ) => {
  166. const figure = data.input;
  167. consumable.consume( figure, { name: true, class: 'image' } );
  168. }, { priority: 'high' } );
  169. editor.setData( '<figure class="image"><img src="foo.png" alt="alt text" /></figure>' );
  170. expect( getModelData( model, { withoutSelection: true } ) )
  171. .to.equal( '' );
  172. } );
  173. it( 'should dispatch conversion for nested elements', () => {
  174. const conversionSpy = sinon.spy();
  175. editor.data.viewToModel.on( 'element:figcaption', conversionSpy );
  176. editor.setData( '<figure class="image"><img src="foo.png" alt="alt text" /><figcaption></figcaption></figure>' );
  177. sinon.assert.calledOnce( conversionSpy );
  178. } );
  179. it( 'should convert bare img element', () => {
  180. editor.setData( '<img src="foo.png" alt="alt text" />' );
  181. expect( getModelData( model, { withoutSelection: true } ) )
  182. .to.equal( '<image alt="alt text" src="foo.png"></image>' );
  183. } );
  184. it( 'should not convert alt attribute on non-img element', () => {
  185. const data = editor.data;
  186. const editing = editor.editing;
  187. model.schema.register( 'div', {
  188. inheritAllFrom: '$block',
  189. allowAttributes: 'alt'
  190. } );
  191. buildModelConverter().for( data.modelToView, editing.modelToView ).fromElement( 'div' ).toElement( 'div' );
  192. buildViewConverter().for( data.viewToModel ).fromElement( 'div' ).toElement( 'div' );
  193. editor.setData( '<div alt="foo"></div>' );
  194. expect( getModelData( model, { withoutSelection: true } ) ).to.equal( '<div></div>' );
  195. } );
  196. it( 'should handle figure with two images', () => {
  197. model.schema.extend( '$text', { allowIn: 'image' } );
  198. editor.setData( '<figure class="image"><img src="foo.jpg" /><img src="bar.jpg" />abc</figure>' );
  199. // The foo.jpg image is properly converted using figure converter. The other image was tried to
  200. // be added as a child of foo.jpg and then was autohoisted.
  201. expect( getModelData( model, { withoutSelection: true } ) )
  202. .to.equal( '<image src="bar.jpg"></image><image src="foo.jpg">abc</image>' );
  203. } );
  204. it( 'should convert image with srcset attribute', () => {
  205. editor.setData(
  206. '<figure class="image">' +
  207. '<img src="foo.png" alt="alt text" srcset="small.png 148w, big.png 1024w" />' +
  208. '</figure>'
  209. );
  210. expect( getModelData( model, { withoutSelection: true } ) )
  211. .to.equal( '<image alt="alt text" src="foo.png" srcset="{"data":"small.png 148w, big.png 1024w"}"></image>' );
  212. } );
  213. it( 'should convert image with srcset and width attributes', () => {
  214. editor.setData(
  215. '<figure class="image">' +
  216. '<img src="foo.png" alt="alt text" srcset="small.png 148w, big.png 1024w" width="1024" />' +
  217. '</figure>'
  218. );
  219. expect( getModelData( model, { withoutSelection: true } ) ).to.equal(
  220. '<image alt="alt text" src="foo.png" srcset="{"data":"small.png 148w, big.png 1024w","width":"1024"}"></image>' );
  221. } );
  222. it( 'should ignore sizes attribute', () => {
  223. editor.setData(
  224. '<figure class="image">' +
  225. '<img src="foo.png" alt="alt text" srcset="small.png 148w, big.png 1024w" sizes="50vw" />' +
  226. '</figure>'
  227. );
  228. expect( getModelData( model, { withoutSelection: true } ) )
  229. .to.equal( '<image alt="alt text" src="foo.png" srcset="{"data":"small.png 148w, big.png 1024w"}"></image>' );
  230. } );
  231. describe( 'should autohoist images', () => {
  232. beforeEach( () => {
  233. model.schema.register( 'div', { inheritAllFrom: '$block' } );
  234. buildModelConverter()
  235. .for( editor.data.modelToView, editor.editing.modelToView )
  236. .fromElement( 'div' )
  237. .toElement( 'div' );
  238. buildViewConverter()
  239. .for( editor.data.viewToModel )
  240. .fromElement( 'div' )
  241. .toElement( 'div' );
  242. } );
  243. it( 'image between non-hoisted elements', () => {
  244. editor.setData( '<div>foo<img src="foo.jpg" alt="foo" />bar</div>' );
  245. expect( getModelData( model, { withoutSelection: true } ) ).to.equal(
  246. '<div>foo</div>' +
  247. '<image alt="foo" src="foo.jpg"></image>' +
  248. '<div>bar</div>'
  249. );
  250. } );
  251. it( 'multiple images', () => {
  252. editor.setData( '<div>foo<img src="foo.jpg" alt="foo" />ba<img src="foo.jpg" alt="foo" />r</div>' );
  253. expect( getModelData( model, { withoutSelection: true } ) ).to.equal(
  254. '<div>foo</div>' +
  255. '<image alt="foo" src="foo.jpg"></image>' +
  256. '<div>ba</div>' +
  257. '<image alt="foo" src="foo.jpg"></image>' +
  258. '<div>r</div>'
  259. );
  260. } );
  261. it( 'images on borders of parent', () => {
  262. editor.setData( '<div><img src="foo.jpg" alt="foo" />foobar<img src="foo.jpg" alt="foo" /></div>' );
  263. expect( getModelData( model, { withoutSelection: true } ) ).to.equal(
  264. '<image alt="foo" src="foo.jpg"></image>' +
  265. '<div>foobar</div>' +
  266. '<image alt="foo" src="foo.jpg"></image>'
  267. );
  268. } );
  269. it( 'images are only content of parent', () => {
  270. editor.setData( '<div><img src="foo.jpg" alt="foo" /><img src="foo.jpg" alt="foo" /></div>' );
  271. expect( getModelData( model, { withoutSelection: true } ) ).to.equal(
  272. '<image alt="foo" src="foo.jpg"></image>' +
  273. '<image alt="foo" src="foo.jpg"></image>'
  274. );
  275. } );
  276. it( 'deep autohoisting #1', () => {
  277. model.schema.extend( 'div', { allowIn: 'div' } );
  278. editor.setData( '<div>foo<div>xx<img src="foo.jpg" alt="foo" /></div>bar</div>' );
  279. expect( getModelData( model, { withoutSelection: true } ) ).to.equal(
  280. '<div>' +
  281. 'foo' +
  282. '<div>' +
  283. 'xx' +
  284. '</div>' +
  285. '</div>' +
  286. '<image alt="foo" src="foo.jpg"></image>' +
  287. '<div>bar</div>'
  288. );
  289. } );
  290. it( 'deep autohoisting #2', () => {
  291. model.schema.extend( 'div', { allowIn: 'div' } );
  292. editor.setData(
  293. '<div>x</div>' +
  294. '<div><div><div><img src="foo.jpg" alt="foo" /></div></div></div>' +
  295. '<div>y</div>'
  296. );
  297. expect( getModelData( model, { withoutSelection: true } ) ).to.equal(
  298. '<div>x</div><image alt="foo" src="foo.jpg"></image><div>y</div>'
  299. );
  300. } );
  301. it( 'should not break a limiting element', () => {
  302. model.schema.register( 'limit', {
  303. inheritAllFrom: '$block',
  304. isLimit: true
  305. } );
  306. model.schema.extend( 'div', { allowIn: 'limit' } );
  307. buildModelConverter()
  308. .for( editor.data.modelToView, editor.editing.modelToView ).fromElement( 'limit' ).toElement( 'limit' );
  309. buildViewConverter().for( editor.data.viewToModel ).fromElement( 'limit' ).toElement( 'limit' );
  310. editor.setData( '<limit><div>foo<img src="foo.jpg" alt="foo" />bar</div></limit>' );
  311. // <limit> element does not have converters so it is not converted.
  312. expect( getModelData( model, { withoutSelection: true } ) ).to.equal( '<limit><div>foobar</div></limit>' );
  313. } );
  314. it( 'should not convert and autohoist image element without src attribute (which is not allowed by schema)', () => {
  315. editor.setData( '<div>foo<img alt="foo" />bar</div>' );
  316. expect( getModelData( model, { withoutSelection: true } ) ).to.equal( '<div>foobar</div>' );
  317. } );
  318. } );
  319. } );
  320. } );
  321. describe( 'conversion in editing pipeline', () => {
  322. describe( 'model to view', () => {
  323. it( 'should convert', () => {
  324. setModelData( model, '<image src="foo.png" alt="alt text"></image>' );
  325. expect( getViewData( viewDocument, { withoutSelection: true } ) ).to.equal(
  326. '<figure class="ck-widget image" contenteditable="false"><img alt="alt text" src="foo.png"></img></figure>'
  327. );
  328. } );
  329. it( 'converted element should be widgetized', () => {
  330. setModelData( model, '<image src="foo.png" alt="alt text"></image>' );
  331. const figure = viewDocument.getRoot().getChild( 0 );
  332. expect( figure.name ).to.equal( 'figure' );
  333. expect( isImageWidget( figure ) ).to.be.true;
  334. } );
  335. it( 'should convert attribute change', () => {
  336. setModelData( model, '<image src="foo.png" alt="alt text"></image>' );
  337. const image = document.getRoot().getChild( 0 );
  338. model.change( writer => {
  339. writer.setAttribute( 'alt', 'new text', image );
  340. } );
  341. expect( getViewData( viewDocument, { withoutSelection: true } ) ).to.equal(
  342. '<figure class="ck-widget image" contenteditable="false"><img alt="new text" src="foo.png"></img></figure>'
  343. );
  344. } );
  345. it( 'should convert attribute removal', () => {
  346. setModelData( model, '<image src="foo.png" alt="alt text"></image>' );
  347. const image = document.getRoot().getChild( 0 );
  348. model.change( writer => {
  349. writer.removeAttribute( 'alt', image );
  350. } );
  351. expect( getViewData( viewDocument, { withoutSelection: true } ) )
  352. .to.equal( '<figure class="ck-widget image" contenteditable="false"><img src="foo.png"></img></figure>' );
  353. } );
  354. it( 'should not convert change if is already consumed', () => {
  355. setModelData( model, '<image src="foo.png" alt="alt text"></image>' );
  356. const image = document.getRoot().getChild( 0 );
  357. editor.editing.modelToView.on( 'attribute:alt:image', ( evt, data, consumable ) => {
  358. consumable.consume( data.item, 'attribute:alt' );
  359. }, { priority: 'high' } );
  360. model.change( writer => {
  361. writer.removeAttribute( 'alt', image );
  362. } );
  363. expect( getViewData( viewDocument, { withoutSelection: true } ) ).to.equal(
  364. '<figure class="ck-widget image" contenteditable="false"><img alt="alt text" src="foo.png"></img></figure>'
  365. );
  366. } );
  367. it( 'should convert srcset attribute to srcset and sizes', () => {
  368. setModelData( model,
  369. '<image ' +
  370. 'src="foo.png" ' +
  371. 'alt="alt text" ' +
  372. 'srcset=\'{ "data":"small.png 148w, big.png 1024w" }\'>' +
  373. '</image>' );
  374. expect( getViewData( viewDocument, { withoutSelection: true } ) ).to.equal(
  375. '<figure class="ck-widget image" contenteditable="false">' +
  376. '<img alt="alt text" sizes="100vw" src="foo.png" srcset="small.png 148w, big.png 1024w"></img>' +
  377. '</figure>'
  378. );
  379. } );
  380. it( 'should not convert srcset attribute if has wrong data', () => {
  381. setModelData( model,
  382. '<image ' +
  383. 'src="foo.png" ' +
  384. 'alt="alt text" ' +
  385. 'srcset=\'{ "foo":"bar" }\'>' +
  386. '</image>' );
  387. const image = document.getRoot().getChild( 0 );
  388. model.change( writer => {
  389. writer.removeAttribute( 'srcset', image );
  390. } );
  391. expect( getViewData( viewDocument, { withoutSelection: true } ) ).to.equal(
  392. '<figure class="ck-widget image" contenteditable="false">' +
  393. '<img alt="alt text" src="foo.png"></img>' +
  394. '</figure>'
  395. );
  396. } );
  397. it( 'should convert srcset attribute to srcset, width and sizes', () => {
  398. setModelData( model,
  399. '<image ' +
  400. 'src="foo.png" ' +
  401. 'alt="alt text" ' +
  402. 'srcset=\'{ "data":"small.png 148w, big.png 1024w", "width":"1024" }\'>' +
  403. '</image>' );
  404. expect( getViewData( viewDocument, { withoutSelection: true } ) ).to.equal(
  405. '<figure class="ck-widget image" contenteditable="false">' +
  406. '<img alt="alt text" sizes="100vw" src="foo.png" srcset="small.png 148w, big.png 1024w" width="1024"></img>' +
  407. '</figure>'
  408. );
  409. } );
  410. it( 'should remove sizes and srcsset attribute when srcset attribute is removed from model', () => {
  411. setModelData( model, '<image src="foo.png" srcset=\'{ "data": "small.png 148w, big.png 1024w" }\'></image>' );
  412. const image = document.getRoot().getChild( 0 );
  413. model.change( writer => {
  414. writer.removeAttribute( 'srcset', image );
  415. } );
  416. expect( getViewData( viewDocument, { withoutSelection: true } ) ).to.equal(
  417. '<figure class="ck-widget image" contenteditable="false">' +
  418. '<img src="foo.png"></img>' +
  419. '</figure>'
  420. );
  421. } );
  422. it( 'should remove width, sizes and srcsset attribute when srcset attribute is removed from model', () => {
  423. setModelData( model,
  424. '<image ' +
  425. 'src="foo.png" ' +
  426. 'srcset=\'{ "data": "small.png 148w, big.png 1024w", "width": "1024" }\'>' +
  427. '</image>'
  428. );
  429. const image = document.getRoot().getChild( 0 );
  430. model.change( writer => {
  431. writer.removeAttribute( 'srcset', image );
  432. } );
  433. expect( getViewData( viewDocument, { withoutSelection: true } ) ).to.equal(
  434. '<figure class="ck-widget image" contenteditable="false">' +
  435. '<img src="foo.png"></img>' +
  436. '</figure>'
  437. );
  438. } );
  439. it( 'should not convert srcset attribute if is already consumed', () => {
  440. editor.editing.modelToView.on( 'attribute:srcset:image', ( evt, data, consumable ) => {
  441. const modelImage = data.item;
  442. consumable.consume( modelImage, evt.name );
  443. }, { priority: 'high' } );
  444. setModelData( model,
  445. '<image ' +
  446. 'src="foo.png" ' +
  447. 'alt="alt text" ' +
  448. 'srcset=\'{ "data": "small.png 148w, big.png 1024w", "width": "1024" }\'>' +
  449. '</image>'
  450. );
  451. expect( getViewData( viewDocument, { withoutSelection: true } ) ).to.equal(
  452. '<figure class="ck-widget image" contenteditable="false">' +
  453. '<img alt="alt text" src="foo.png"></img>' +
  454. '</figure>'
  455. );
  456. } );
  457. } );
  458. } );
  459. } );