j1-template 2024.0.0 → 2024.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. checksums.yaml +4 -4
  2. data/apps/public/cc/cc.yml +35 -33
  3. data/assets/data/cookieconsent.html +15 -106
  4. data/assets/data/docsearch.html +155 -0
  5. data/assets/data/iframes.html +96 -0
  6. data/assets/data/quicklinks.html +10 -0
  7. data/assets/data/speak2me.html +4 -3
  8. data/assets/data/translator.html +27 -147
  9. data/assets/themes/j1/adapter/js/{chat.js → chatbot.js} +20 -18
  10. data/assets/themes/j1/adapter/js/clipboard.js +1 -1
  11. data/assets/themes/j1/adapter/js/docsearch.js +270 -0
  12. data/assets/themes/j1/adapter/js/gallery.js +1 -1
  13. data/assets/themes/j1/adapter/js/iframer.js +350 -0
  14. data/assets/themes/j1/adapter/js/mmenu.js +1 -1
  15. data/assets/themes/j1/adapter/js/navigator.js +4 -0
  16. data/assets/themes/j1/adapter/js/rouge.js +1 -1
  17. data/assets/themes/j1/adapter/js/speak2me.js +2 -2
  18. data/assets/themes/j1/adapter/js/translator.js +5 -0
  19. data/assets/themes/j1/core/css/animate.css +4 -4
  20. data/assets/themes/j1/core/css/animate.min.css +1 -1
  21. data/assets/themes/j1/core/css/themes/unolight/bootstrap.css +1 -1
  22. data/assets/themes/j1/core/css/themes/unolight/bootstrap.min.css +1 -1
  23. data/assets/themes/j1/core/js/template.js +19 -7
  24. data/assets/themes/j1/core/js/template.min.js +1 -1
  25. data/assets/themes/j1/core/js/template.min.js.map +1 -1
  26. data/assets/themes/j1/modules/iframeResizer/LICENSE +1 -1
  27. data/assets/themes/j1/modules/iframeResizer/README.md +105 -0
  28. data/assets/themes/j1/modules/iframeResizer/{examples → example}/frame.absolute.html +12 -11
  29. data/assets/themes/j1/modules/iframeResizer/{examples → example}/frame.content.html +22 -28
  30. data/assets/themes/j1/modules/iframeResizer/{examples → example}/frame.hover.html +9 -8
  31. data/assets/themes/j1/modules/iframeResizer/{examples → example}/frame.nested.html +12 -12
  32. data/assets/themes/j1/modules/iframeResizer/{examples → example}/frame.textarea.html +6 -8
  33. data/assets/themes/j1/modules/iframeResizer/{examples → example}/frame.tolerance.html +11 -11
  34. data/assets/themes/j1/modules/iframeResizer/{examples → example}/index.html +43 -19
  35. data/assets/themes/j1/modules/iframeResizer/{examples → example}/two.html +8 -11
  36. data/assets/themes/j1/modules/iframeResizer/js/client/iframeResizer.contentWindow.js +84 -68
  37. data/assets/themes/j1/modules/iframeResizer/js/client/iframeResizer.contentWindow.min.js +10 -8
  38. data/assets/themes/j1/modules/iframeResizer/js/resizer.js +149 -72
  39. data/assets/themes/j1/modules/iframeResizer/js/resizer.min.js +11 -7
  40. data/lib/j1/version.rb +1 -1
  41. data/lib/starter_web/README.md +5 -5
  42. data/lib/starter_web/_config.yml +1 -1
  43. data/lib/starter_web/_data/modules/{framer.yml → _docsearch.yml} +20 -9
  44. data/lib/starter_web/_data/modules/{chat.yml → chatbots.yml} +2 -2
  45. data/lib/starter_web/_data/modules/defaults/{chat.yml → chatbots.yml} +2 -2
  46. data/lib/starter_web/_data/modules/defaults/cookieconsent.yml +3 -75
  47. data/lib/starter_web/_data/modules/defaults/docsearch.yml +87 -0
  48. data/lib/starter_web/_data/modules/defaults/{framer.yml → iframer.yml} +56 -21
  49. data/lib/starter_web/_data/modules/defaults/navigator.yml +4 -0
  50. data/lib/starter_web/_data/modules/defaults/translator.yml +11 -52
  51. data/lib/starter_web/_data/modules/docsearch.yml +45 -0
  52. data/lib/starter_web/_data/modules/iframer.yml +103 -0
  53. data/lib/starter_web/_data/modules/navigator_menu.yml +39 -1
  54. data/lib/starter_web/_data/resources.yml +41 -19
  55. data/lib/starter_web/_data/templates/feed.xml +1 -1
  56. data/lib/starter_web/_plugins/asciidoctor/iframe-block.rb +46 -0
  57. data/lib/starter_web/_plugins/index/lunr.rb +2 -1
  58. data/lib/starter_web/package.json +74 -75
  59. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/000_intro.adoc +1 -1
  60. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/100_converter.adoc +1 -1
  61. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/200_themes.adoc +1 -1
  62. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/documents/100_converter/111_about_the_converter.asciidoc +1 -2
  63. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/documents/100_converter/112_getting_started.asciidoc +1 -0
  64. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/documents/200_themes/211_language_overview.asciidoc +0 -1
  65. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/documents/200_themes/212_values.asciidoc +1 -2
  66. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/_includes/documents/200_themes/213_fonts.asciidoc +4 -1
  67. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/a2p.bat +2 -2
  68. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/a2p.sh +2 -3
  69. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/documentation.a2p +5 -9
  70. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/documentation.adoc +1 -1
  71. data/lib/starter_web/pages/public/asciidoc_skeletons/documentation/documentation.pdf +27727 -0
  72. data/lib/starter_web/pages/public/asciidoc_skeletons/multi-document/multi.adoc +1 -1
  73. data/lib/starter_web/pages/public/asciidoc_skeletons/simple-document/simple.adoc +1 -1
  74. data/lib/starter_web/pages/public/features/general.adoc +1 -1
  75. data/lib/starter_web/pages/public/features/template.adoc +1 -1
  76. data/lib/starter_web/pages/public/learn/roundtrip/asciidoc_extensions.adoc +1 -1
  77. data/lib/starter_web/pages/public/learn/roundtrip/bootstrap_themes.adoc +1 -1
  78. data/lib/starter_web/pages/public/learn/roundtrip/highlghter_rouge.adoc +1 -1
  79. data/lib/starter_web/pages/public/learn/roundtrip/lunr_search.adoc +1 -1
  80. data/lib/starter_web/pages/public/learn/roundtrip/modal_extentions.adoc +1 -1
  81. data/lib/starter_web/pages/public/learn/roundtrip/present_images.adoc +1 -1
  82. data/lib/starter_web/pages/public/learn/roundtrip/present_videos.adoc +1 -1
  83. data/lib/starter_web/pages/public/learn/roundtrip/responsive_tables.adoc +1 -1
  84. data/lib/starter_web/pages/public/learn/roundtrip/typography.adoc +1 -1
  85. data/lib/starter_web/pages/public/legal/en/100_copyright.adoc +1 -1
  86. data/lib/starter_web/pages/public/legal/en/300_privacy.adoc +1 -1
  87. data/lib/starter_web/pages/public/legal/en/400_comment_policy.adoc +1 -1
  88. data/lib/starter_web/pages/public/panels/intro_panel/panel.adoc +1 -1
  89. data/lib/starter_web/pages/public/plans/plans.adoc +1 -1
  90. data/lib/starter_web/pages/public/tools/previewer/_includes/documents/frame.hover.html +69 -0
  91. data/lib/starter_web/pages/public/tools/previewer/_includes/documents/frame.nested.html +75 -0
  92. data/lib/starter_web/pages/public/tools/previewer/_includes/documents/frame.textarea.html +57 -0
  93. data/lib/starter_web/pages/public/tools/previewer/_includes/documents/my.content.html +112 -0
  94. data/lib/starter_web/pages/public/tools/previewer/iframer_documents/iframe.content.html +51 -0
  95. data/lib/starter_web/pages/public/tools/previewer/iframer_documents/iframe.docsearch.info.html +84 -0
  96. data/lib/starter_web/pages/public/tools/previewer/preview_bootstrap_theme.adoc +1 -1
  97. data/lib/starter_web/pages/public/tools/previewer/preview_docsearch.adoc +92 -0
  98. data/lib/starter_web/pages/public/tools/previewer/preview_iframer.adoc +106 -0
  99. metadata +35 -25
  100. data/assets/themes/j1/adapter/js/framer.js +0 -237
  101. data/assets/themes/j1/modules/chatgpt/css/theme/uno.css +0 -92
  102. data/assets/themes/j1/modules/chatgpt/css/theme/uno.min.css +0 -16
  103. data/lib/starter_web/_data/_defaults/private.yml +0 -129
  104. data/lib/starter_web/_data/modules/nbinteract.yml +0 -476
  105. data/lib/starter_web/utilsrv/_defaults/package.json +0 -57
  106. data/lib/starter_web/utilsrv/package.json +0 -57
  107. data/lib/starter_web/utilsrv/server.js +0 -775
  108. /data/assets/themes/j1/modules/{chat → chatbot}/css/theme/uno.css +0 -0
  109. /data/assets/themes/j1/modules/{chat → chatbot}/css/theme/uno.min.css +0 -0
@@ -1,12 +1,12 @@
1
- /*
2
- * File: iframeResizer.contentWindow.js
3
- * Desc: Include this file in any page being loaded into an iframe
4
- * to force the iframe to resize to the content size.
5
- * Requires: iframeResizer.js on host page.
6
- * Doc: https://github.com/davidjbradshaw/iframe-resizer
7
- * Author: David J. Bradshaw - dave@bradshaw.net
8
- *
9
- */
1
+ /*
2
+ * File: iframeResizer.contentWindow.js
3
+ * v4.3.7
4
+ * Desc: Include this file in any page being loaded into an iframe
5
+ * to force the iframe to resize to the content size.
6
+ * Requires: iframeResizer.js on host page.
7
+ * Doc: https://github.com/davidjbradshaw/iframe-resizer
8
+ * Author: David J. Bradshaw - dave@bradshaw.net
9
+ */
10
10
 
11
11
  // eslint-disable-next-line sonarjs/cognitive-complexity, no-shadow-restricted-names
12
12
  ;(function (undefined) {
@@ -32,6 +32,7 @@
32
32
  interval = 32,
33
33
  intervalTimer = null,
34
34
  logging = false,
35
+ mouseEvents = false,
35
36
  msgID = '[iFrameSizer]', // Must match host page msg ID
36
37
  msgIdLen = msgID.length,
37
38
  myID = '',
@@ -78,6 +79,7 @@
78
79
  {},
79
80
  {
80
81
  passive: {
82
+ // eslint-disable-next-line getter-return
81
83
  get: function () {
82
84
  passiveSupported = true
83
85
  }
@@ -110,7 +112,7 @@
110
112
  timeout = null,
111
113
  previous = 0,
112
114
  later = function () {
113
- previous = getNow()
115
+ previous = Date.now()
114
116
  timeout = null
115
117
  result = func.apply(context, args)
116
118
  if (!timeout) {
@@ -120,7 +122,7 @@
120
122
  }
121
123
 
122
124
  return function () {
123
- var now = getNow()
125
+ var now = Date.now()
124
126
 
125
127
  if (!previous) {
126
128
  previous = now
@@ -152,13 +154,6 @@
152
154
  }
153
155
  }
154
156
 
155
- var getNow =
156
- Date.now ||
157
- function () {
158
- /* istanbul ignore next */ // Not testable in PhantonJS
159
- return new Date().getTime()
160
- }
161
-
162
157
  function formatLogMsg(msg) {
163
158
  return msgID + '[' + myID + '] ' + msg
164
159
  }
@@ -179,7 +174,7 @@
179
174
 
180
175
  function init() {
181
176
  readDataFromParent()
182
- log('Initialising iFrame (' + location.href + ')')
177
+ log('Initialising iFrame (' + window.location.href + ')')
183
178
  readDataFromPage()
184
179
  setMargin()
185
180
  setBodyStyle('background', bodyBackground)
@@ -189,6 +184,7 @@
189
184
  checkWidthMode()
190
185
  stopInfiniteResizingOfIFrame()
191
186
  setupPublicMethods()
187
+ setupMouseEvents()
192
188
  startEventListeners()
193
189
  inPageLinks = setupInPageLinks()
194
190
  sendSize('init', 'Init message from host page')
@@ -200,22 +196,23 @@
200
196
  return 'true' === str
201
197
  }
202
198
 
203
- var data = initMsg.substr(msgIdLen).split(':')
199
+ var data = initMsg.slice(msgIdLen).split(':')
204
200
 
205
201
  myID = data[0]
206
- bodyMargin = undefined !== data[1] ? Number(data[1]) : bodyMargin // For V1 compatibility
207
- calculateWidth = undefined !== data[2] ? strBool(data[2]) : calculateWidth
208
- logging = undefined !== data[3] ? strBool(data[3]) : logging
209
- interval = undefined !== data[4] ? Number(data[4]) : interval
210
- autoResize = undefined !== data[6] ? strBool(data[6]) : autoResize
202
+ bodyMargin = undefined === data[1] ? bodyMargin : Number(data[1]) // For V1 compatibility
203
+ calculateWidth = undefined === data[2] ? calculateWidth : strBool(data[2])
204
+ logging = undefined === data[3] ? logging : strBool(data[3])
205
+ interval = undefined === data[4] ? interval : Number(data[4])
206
+ autoResize = undefined === data[6] ? autoResize : strBool(data[6])
211
207
  bodyMarginStr = data[7]
212
- heightCalcMode = undefined !== data[8] ? data[8] : heightCalcMode
208
+ heightCalcMode = undefined === data[8] ? heightCalcMode : data[8]
213
209
  bodyBackground = data[9]
214
210
  bodyPadding = data[10]
215
- tolerance = undefined !== data[11] ? Number(data[11]) : tolerance
216
- inPageLinks.enable = undefined !== data[12] ? strBool(data[12]) : false
217
- resizeFrom = undefined !== data[13] ? data[13] : resizeFrom
218
- widthCalcMode = undefined !== data[14] ? data[14] : widthCalcMode
211
+ tolerance = undefined === data[11] ? tolerance : Number(data[11])
212
+ inPageLinks.enable = undefined === data[12] ? false : strBool(data[12])
213
+ resizeFrom = undefined === data[13] ? resizeFrom : data[13]
214
+ widthCalcMode = undefined === data[14] ? widthCalcMode : data[14]
215
+ mouseEvents = undefined === data[15] ? mouseEvents : strBool(data[15])
219
216
  }
220
217
 
221
218
  function depricate(key) {
@@ -381,7 +378,7 @@
381
378
  manageTriggerEvent({
382
379
  method: method,
383
380
  eventType: 'Print',
384
- eventName: ['afterprint', 'beforeprint']
381
+ eventNames: ['afterprint', 'beforeprint']
385
382
  })
386
383
  manageTriggerEvent({
387
384
  method: method,
@@ -528,13 +525,13 @@
528
525
  function getPagePosition() {
529
526
  return {
530
527
  x:
531
- window.pageXOffset !== undefined
532
- ? window.pageXOffset
533
- : document.documentElement.scrollLeft,
528
+ window.pageXOffset === undefined
529
+ ? document.documentElement.scrollLeft
530
+ : window.pageXOffset,
534
531
  y:
535
- window.pageYOffset !== undefined
536
- ? window.pageYOffset
537
- : document.documentElement.scrollTop
532
+ window.pageYOffset === undefined
533
+ ? document.documentElement.scrollTop
534
+ : window.pageYOffset
538
535
  }
539
536
  }
540
537
 
@@ -569,21 +566,24 @@
569
566
  document.getElementById(hashData) ||
570
567
  document.getElementsByName(hashData)[0]
571
568
 
572
- if (undefined !== target) {
573
- jumpToTarget(target)
574
- } else {
569
+ if (undefined === target) {
575
570
  log(
576
571
  'In page link (#' +
577
572
  hash +
578
573
  ') not found in iFrame, so sending to parent'
579
574
  )
580
575
  sendMsg(0, 0, 'inPageLink', '#' + hash)
576
+ } else {
577
+ jumpToTarget(target)
581
578
  }
582
579
  }
583
580
 
584
581
  function checkLocationHash() {
585
- if ('' !== location.hash && '#' !== location.hash) {
586
- findTarget(location.href)
582
+ var hash = window.location.hash
583
+ var href = window.location.href
584
+
585
+ if ('' !== hash && '#' !== hash) {
586
+ findTarget(href)
587
587
  }
588
588
  }
589
589
 
@@ -641,6 +641,22 @@
641
641
  }
642
642
  }
643
643
 
644
+ function setupMouseEvents() {
645
+ if (mouseEvents !== true) return
646
+
647
+ function sendMouse(e) {
648
+ sendMsg(0, 0, e.type, e.screenY + ':' + e.screenX)
649
+ }
650
+
651
+ function addMouseListener(evt, name) {
652
+ log('Add event listener: ' + name)
653
+ addEventListener(window.document, evt, sendMouse)
654
+ }
655
+
656
+ addMouseListener('mouseenter', 'Mouse Enter')
657
+ addMouseListener('mouseleave', 'Mouse Leave')
658
+ }
659
+
644
660
  function setupPublicMethods() {
645
661
  log('Enable public methods')
646
662
 
@@ -773,7 +789,7 @@
773
789
 
774
790
  function imageEventTriggered(event, type, typeDesc) {
775
791
  removeImageLoadListener(event.target)
776
- sendSize(type, typeDesc + ': ' + event.target.src, undefined, undefined)
792
+ sendSize(type, typeDesc + ': ' + event.target.src)
777
793
  }
778
794
 
779
795
  function imageLoaded(event) {
@@ -855,7 +871,7 @@
855
871
  el = el || document.body // Not testable in phantonJS
856
872
 
857
873
  retVal = document.defaultView.getComputedStyle(el, null)
858
- retVal = null !== retVal ? retVal[prop] : 0
874
+ retVal = null === retVal ? 0 : retVal[prop]
859
875
 
860
876
  return parseInt(retVal, base)
861
877
  }
@@ -873,7 +889,7 @@
873
889
  elVal = 0,
874
890
  maxVal = 0,
875
891
  Side = capitalizeFirstLetter(side),
876
- timer = getNow()
892
+ timer = Date.now()
877
893
 
878
894
  for (var i = 0; i < elementsLength; i++) {
879
895
  elVal =
@@ -884,7 +900,7 @@
884
900
  }
885
901
  }
886
902
 
887
- timer = getNow() - timer
903
+ timer = Date.now() - timer
888
904
 
889
905
  log('Parsed ' + elementsLength + ' HTML elements')
890
906
  log('Element position calculated in ' + timer + 'ms')
@@ -894,12 +910,12 @@
894
910
  return maxVal
895
911
  }
896
912
 
897
- function getAllMeasurements(dimention) {
913
+ function getAllMeasurements(dimensions) {
898
914
  return [
899
- dimention.bodyOffset(),
900
- dimention.bodyScroll(),
901
- dimention.documentElementOffset(),
902
- dimention.documentElementScroll()
915
+ dimensions.bodyOffset(),
916
+ dimensions.bodyScroll(),
917
+ dimensions.documentElementOffset(),
918
+ dimensions.documentElementScroll()
903
919
  ]
904
920
  }
905
921
 
@@ -911,7 +927,7 @@
911
927
 
912
928
  var elements = document.querySelectorAll('[' + tag + ']')
913
929
 
914
- if (0 === elements.length) noTaggedElementsFound()
930
+ if (elements.length === 0) noTaggedElementsFound()
915
931
 
916
932
  return getMaxElement(side, elements)
917
933
  }
@@ -930,7 +946,7 @@
930
946
  },
931
947
 
932
948
  offset: function () {
933
- return getHeight.bodyOffset() // Backwards compatability
949
+ return getHeight.bodyOffset() // Backwards compatibility
934
950
  },
935
951
 
936
952
  bodyScroll: function getBodyScrollHeight() {
@@ -1034,9 +1050,9 @@
1034
1050
  }
1035
1051
 
1036
1052
  currentHeight =
1037
- undefined !== customHeight ? customHeight : getHeight[heightCalcMode]()
1053
+ undefined === customHeight ? getHeight[heightCalcMode]() : customHeight
1038
1054
  currentWidth =
1039
- undefined !== customWidth ? customWidth : getWidth[widthCalcMode]()
1055
+ undefined === customWidth ? getWidth[widthCalcMode]() : customWidth
1040
1056
 
1041
1057
  return (
1042
1058
  checkTolarance(height, currentHeight) ||
@@ -1090,7 +1106,9 @@
1090
1106
  return triggerLocked && triggerEvent in doubleEventList
1091
1107
  }
1092
1108
 
1093
- if (!isDoubleFiredEvent()) {
1109
+ if (isDoubleFiredEvent()) {
1110
+ log('Trigger event cancelled: ' + triggerEvent)
1111
+ } else {
1094
1112
  recordTrigger()
1095
1113
  if (triggerEvent === 'init') {
1096
1114
  sizeIFrame(triggerEvent, triggerEventDesc, customHeight, customWidth)
@@ -1102,8 +1120,6 @@
1102
1120
  customWidth
1103
1121
  )
1104
1122
  }
1105
- } else {
1106
- log('Trigger event cancelled: ' + triggerEvent)
1107
1123
  }
1108
1124
  }
1109
1125
 
@@ -1155,7 +1171,7 @@
1155
1171
  size +
1156
1172
  ':' +
1157
1173
  triggerEvent +
1158
- (undefined !== msg ? ':' + msg : '')
1174
+ (undefined === msg ? '' : ':' + msg)
1159
1175
 
1160
1176
  log('Sending message to host page (' + message + ')')
1161
1177
  target.postMessage(msgID + message, targetOrigin)
@@ -1181,11 +1197,11 @@
1181
1197
  },
1182
1198
 
1183
1199
  reset: function resetFromParent() {
1184
- if (!initLock) {
1200
+ if (initLock) {
1201
+ log('Page reset ignored by init')
1202
+ } else {
1185
1203
  log('Page size reset by host page')
1186
1204
  triggerReset('resetPage')
1187
- } else {
1188
- log('Page reset ignored by init')
1189
1205
  }
1190
1206
  },
1191
1207
 
@@ -1198,7 +1214,7 @@
1198
1214
  },
1199
1215
  inPageLink: function inPageLinkF() {
1200
1216
  this.moveToAnchor()
1201
- }, // Backward compatability
1217
+ }, // Backward compatibility
1202
1218
 
1203
1219
  pageInfo: function pageInfoFromParent() {
1204
1220
  var msgBody = getData()
@@ -1218,7 +1234,7 @@
1218
1234
  }
1219
1235
 
1220
1236
  function isMessageForUs() {
1221
- return msgID === ('' + event.data).substr(0, msgIdLen) // ''+ Protects against non-string messages
1237
+ return msgID === ('' + event.data).slice(0, msgIdLen) // ''+ Protects against non-string messages
1222
1238
  }
1223
1239
 
1224
1240
  function getMessageType() {
@@ -1226,20 +1242,21 @@
1226
1242
  }
1227
1243
 
1228
1244
  function getData() {
1229
- return event.data.substr(event.data.indexOf(':') + 1)
1245
+ return event.data.slice(event.data.indexOf(':') + 1)
1230
1246
  }
1231
1247
 
1232
1248
  function isMiddleTier() {
1233
1249
  return (
1234
1250
  (!(typeof module !== 'undefined' && module.exports) &&
1235
1251
  'iFrameResize' in window) ||
1236
- ('jQuery' in window && 'iFrameResize' in window.jQuery.prototype)
1252
+ (window.jQuery !== undefined &&
1253
+ 'iFrameResize' in window.jQuery.prototype)
1237
1254
  )
1238
1255
  }
1239
1256
 
1240
1257
  function isInitMsg() {
1241
1258
  // Test if this message is from a child below us. This is an ugly test, however, updating
1242
- // the message format would break backwards compatibity.
1259
+ // the message format would break backwards compatibility.
1243
1260
  return event.data.split(':')[2] in { true: 1, false: 1 }
1244
1261
  }
1245
1262
 
@@ -1284,5 +1301,4 @@
1284
1301
  addEventListener(window, 'readystatechange', chkLateLoaded)
1285
1302
  chkLateLoaded()
1286
1303
 
1287
-
1288
1304
  })()
@@ -1,9 +1,11 @@
1
- /*! iFrame Resizer (iframeSizer.contentWindow.min.js) - v4.2.11 - 2020-06-02
2
- * Desc: Include this file in any page being loaded into an iframe
3
- * to force the iframe to resize to the content size.
4
- * Requires: iframeResizer.min.js on host page.
5
- * Copyright: (c) 2020 David J. Bradshaw - dave@bradshaw.net
6
- * License: MIT
7
- */
1
+ /*
2
+ * File: iframeResizer.contentWindow.min.js
3
+ * v4.3.7
4
+ * Desc: Include this file in any page being loaded into an iframe
5
+ * to force the iframe to resize to the content size.
6
+ * Requires: iframeResizer.js on host page.
7
+ * Doc: https://github.com/davidjbradshaw/iframe-resizer
8
+ * Author: David J. Bradshaw - dave@bradshaw.net
9
+ */
8
10
 
9
- !function(d){if("undefined"!=typeof window){var n=!0,o=10,i="",r=0,a="",t=null,u="",c=!1,s={resize:1,click:1},l=128,f=!0,m=1,h="bodyOffset",g=h,p=!0,v="",y={},b=32,w=null,T=!1,E="[iFrameSizer]",O=E.length,S="",M={max:1,min:1,bodyScroll:1,documentElementScroll:1},I="child",N=!0,A=window.parent,C="*",z=0,k=!1,e=null,R=16,x=1,L="scroll",F=L,P=window,D=function(){re("onMessage function not defined")},j=function(){},q=function(){},H={height:function(){return re("Custom height calculation function not defined"),document.documentElement.offsetHeight},width:function(){return re("Custom width calculation function not defined"),document.body.scrollWidth}},W={},B=!1;try{var J=Object.create({},{passive:{get:function(){B=!0}}});window.addEventListener("test",ee,J),window.removeEventListener("test",ee,J)}catch(e){}var U,V,K,Q,X,Y,G=Date.now||function(){return(new Date).getTime()},Z={bodyOffset:function(){return document.body.offsetHeight+pe("marginTop")+pe("marginBottom")},offset:function(){return Z.bodyOffset()},bodyScroll:function(){return document.body.scrollHeight},custom:function(){return H.height()},documentElementOffset:function(){return document.documentElement.offsetHeight},documentElementScroll:function(){return document.documentElement.scrollHeight},max:function(){return Math.max.apply(null,ye(Z))},min:function(){return Math.min.apply(null,ye(Z))},grow:function(){return Z.max()},lowestElement:function(){return Math.max(Z.bodyOffset()||Z.documentElementOffset(),ve("bottom",we()))},taggedElement:function(){return be("bottom","data-iframe-height")}},$={bodyScroll:function(){return document.body.scrollWidth},bodyOffset:function(){return document.body.offsetWidth},custom:function(){return H.width()},documentElementScroll:function(){return document.documentElement.scrollWidth},documentElementOffset:function(){return document.documentElement.offsetWidth},scroll:function(){return Math.max($.bodyScroll(),$.documentElementScroll())},max:function(){return Math.max.apply(null,ye($))},min:function(){return Math.min.apply(null,ye($))},rightMostElement:function(){return ve("right",we())},taggedElement:function(){return be("right","data-iframe-width")}},_=(U=Te,X=null,Y=0,function(){var e=G(),t=R-(e-(Y=Y||e));return V=this,K=arguments,t<=0||R<t?(X&&(clearTimeout(X),X=null),Y=e,Q=U.apply(V,K),X||(V=K=null)):X=X||setTimeout(Ee,t),Q});te(window,"message",function(t){var n={init:function(){v=t.data,A=t.source,ae(),f=!1,setTimeout(function(){p=!1},l)},reset:function(){p?ie("Page reset ignored by init"):(ie("Page size reset by host page"),Me("resetPage"))},resize:function(){Oe("resizeParent","Parent window requested size check")},moveToAnchor:function(){y.findTarget(i())},inPageLink:function(){this.moveToAnchor()},pageInfo:function(){var e=i();ie("PageInfoFromParent called from parent: "+e),q(JSON.parse(e)),ie(" --")},message:function(){var e=i();ie("onMessage called from parent: "+e),D(JSON.parse(e)),ie(" --")}};function o(){return t.data.split("]")[1].split(":")[0]}function i(){return t.data.substr(t.data.indexOf(":")+1)}function r(){return t.data.split(":")[2]in{true:1,false:1}}function e(){var e=o();e in n?n[e]():("undefined"==typeof module||!module.exports)&&"iFrameResize"in window||"jQuery"in window&&"iFrameResize"in window.jQuery.prototype||r()||re("Unexpected message ("+t.data+")")}E===(""+t.data).substr(0,O)&&(!1===f?e():r()?n.init():ie('Ignored message of type "'+o()+'". Received before initialization.'))}),te(window,"readystatechange",Ae),Ae()}function ee(){}function te(e,t,n,o){e.addEventListener(t,n,!!B&&(o||{}))}function ne(e){return e.charAt(0).toUpperCase()+e.slice(1)}function oe(e){return E+"["+S+"] "+e}function ie(e){T&&"object"==typeof window.console&&console.log(oe(e))}function re(e){"object"==typeof window.console&&console.warn(oe(e))}function ae(){!function(){function e(e){return"true"===e}var t=v.substr(O).split(":");S=t[0],r=d!==t[1]?Number(t[1]):r,c=d!==t[2]?e(t[2]):c,T=d!==t[3]?e(t[3]):T,b=d!==t[4]?Number(t[4]):b,n=d!==t[6]?e(t[6]):n,a=t[7],g=d!==t[8]?t[8]:g,i=t[9],u=t[10],z=d!==t[11]?Number(t[11]):z,y.enable=d!==t[12]&&e(t[12]),I=d!==t[13]?t[13]:I,F=d!==t[14]?t[14]:F}(),ie("Initialising iFrame ("+location.href+")"),function(){function e(e,t){return"function"==typeof e&&(ie("Setup custom "+t+"CalcMethod"),H[t]=e,e="custom"),e}"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(function(){var e=window.iFrameResizer;ie("Reading data from page: "+JSON.stringify(e)),Object.keys(e).forEach(ue,e),D="onMessage"in e?e.onMessage:D,j="onReady"in e?e.onReady:j,C="targetOrigin"in e?e.targetOrigin:C,g="heightCalculationMethod"in e?e.heightCalculationMethod:g,F="widthCalculationMethod"in e?e.widthCalculationMethod:F}(),g=e(g,"height"),F=e(F,"width"));ie("TargetOrigin for parent set to: "+C)}(),function(){d===a&&(a=r+"px");ce("margin",function(e,t){-1!==t.indexOf("-")&&(re("Negative CSS value ignored for "+e),t="");return t}("margin",a))}(),ce("background",i),ce("padding",u),function(){var e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.appendChild(e)}(),fe(),me(),document.documentElement.style.height="",document.body.style.height="",ie('HTML & body height set to "auto"'),ie("Enable public methods"),P.parentIFrame={autoResize:function(e){return!0===e&&!1===n?(n=!0,he()):!1===e&&!0===n&&(n=!1,de("remove"),null!==t&&t.disconnect(),clearInterval(w)),Ne(0,0,"autoResize",JSON.stringify(n)),n},close:function(){Ne(0,0,"close")},getId:function(){return S},getPageInfo:function(e){"function"==typeof e?(q=e,Ne(0,0,"pageInfo")):(q=function(){},Ne(0,0,"pageInfoStop"))},moveToAnchor:function(e){y.findTarget(e)},reset:function(){Ie("parentIFrame.reset")},scrollTo:function(e,t){Ne(t,e,"scrollTo")},scrollToOffset:function(e,t){Ne(t,e,"scrollToOffset")},sendMessage:function(e,t){Ne(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod:function(e){g=e,fe()},setWidthCalculationMethod:function(e){F=e,me()},setTargetOrigin:function(e){ie("Set targetOrigin: "+e),C=e},size:function(e,t){Oe("size","parentIFrame.size("+((e||"")+(t?","+t:""))+")",e,t)}},he(),y=function(){function r(e){var t=e.getBoundingClientRect(),n={x:window.pageXOffset!==d?window.pageXOffset:document.documentElement.scrollLeft,y:window.pageYOffset!==d?window.pageYOffset:document.documentElement.scrollTop};return{x:parseInt(t.left,10)+parseInt(n.x,10),y:parseInt(t.top,10)+parseInt(n.y,10)}}function t(e){var t,n=e.split("#")[1]||e,o=decodeURIComponent(n),i=document.getElementById(o)||document.getElementsByName(o)[0];d!==i?(t=r(i),ie("Moving to in page link (#"+n+") at x: "+t.x+" y: "+t.y),Ne(t.y,t.x,"scrollToOffset")):(ie("In page link (#"+n+") not found in iFrame, so sending to parent"),Ne(0,0,"inPageLink","#"+n))}function e(){""!==location.hash&&"#"!==location.hash&&t(location.href)}function n(){Array.prototype.forEach.call(document.querySelectorAll('a[href^="#"]'),function(e){"#"!==e.getAttribute("href")&&te(e,"click",function(e){e.preventDefault(),t(this.getAttribute("href"))})})}y.enable?Array.prototype.forEach&&document.querySelectorAll?(ie("Setting up location.hash handlers"),n(),te(window,"hashchange",e),setTimeout(e,l)):re("In page linking not fully supported in this browser! (See README.md for IE8 workaround)"):ie("In page linking not enabled");return{findTarget:t}}(),Oe("init","Init message from host page"),j()}function ue(e){var t=e.split("Callback");if(2===t.length){var n="on"+t[0].charAt(0).toUpperCase()+t[0].slice(1);this[n]=this[e],delete this[e],re("Deprecated: '"+e+"' has been renamed '"+n+"'. The old method will be removed in the next major version.")}}function ce(e,t){d!==t&&""!==t&&"null"!==t&&ie("Body "+e+' set to "'+(document.body.style[e]=t)+'"')}function se(n){var e={add:function(e){function t(){Oe(n.eventName,n.eventType)}W[e]=t,te(window,e,t,{passive:!0})},remove:function(e){var t=W[e];delete W[e],function(e,t,n){e.removeEventListener(t,n,!1)}(window,e,t)}};n.eventNames&&Array.prototype.map?(n.eventName=n.eventNames[0],n.eventNames.map(e[n.method])):e[n.method](n.eventName),ie(ne(n.method)+" event listener: "+n.eventType)}function de(e){se({method:e,eventType:"Animation Start",eventNames:["animationstart","webkitAnimationStart"]}),se({method:e,eventType:"Animation Iteration",eventNames:["animationiteration","webkitAnimationIteration"]}),se({method:e,eventType:"Animation End",eventNames:["animationend","webkitAnimationEnd"]}),se({method:e,eventType:"Input",eventName:"input"}),se({method:e,eventType:"Mouse Up",eventName:"mouseup"}),se({method:e,eventType:"Mouse Down",eventName:"mousedown"}),se({method:e,eventType:"Orientation Change",eventName:"orientationchange"}),se({method:e,eventType:"Print",eventName:["afterprint","beforeprint"]}),se({method:e,eventType:"Ready State Change",eventName:"readystatechange"}),se({method:e,eventType:"Touch Start",eventName:"touchstart"}),se({method:e,eventType:"Touch End",eventName:"touchend"}),se({method:e,eventType:"Touch Cancel",eventName:"touchcancel"}),se({method:e,eventType:"Transition Start",eventNames:["transitionstart","webkitTransitionStart","MSTransitionStart","oTransitionStart","otransitionstart"]}),se({method:e,eventType:"Transition Iteration",eventNames:["transitioniteration","webkitTransitionIteration","MSTransitionIteration","oTransitionIteration","otransitioniteration"]}),se({method:e,eventType:"Transition End",eventNames:["transitionend","webkitTransitionEnd","MSTransitionEnd","oTransitionEnd","otransitionend"]}),"child"===I&&se({method:e,eventType:"IFrame Resized",eventName:"resize"})}function le(e,t,n,o){return t!==e&&(e in n||(re(e+" is not a valid option for "+o+"CalculationMethod."),e=t),ie(o+' calculation method set to "'+e+'"')),e}function fe(){g=le(g,h,Z,"height")}function me(){F=le(F,L,$,"width")}function he(){!0===n?(de("add"),function(){var e=b<0;window.MutationObserver||window.WebKitMutationObserver?e?ge():t=function(){function t(e){function t(e){!1===e.complete&&(ie("Attach listeners to "+e.src),e.addEventListener("load",i,!1),e.addEventListener("error",r,!1),u.push(e))}"attributes"===e.type&&"src"===e.attributeName?t(e.target):"childList"===e.type&&Array.prototype.forEach.call(e.target.querySelectorAll("img"),t)}function o(e){ie("Remove listeners from "+e.src),e.removeEventListener("load",i,!1),e.removeEventListener("error",r,!1),function(e){u.splice(u.indexOf(e),1)}(e)}function n(e,t,n){o(e.target),Oe(t,n+": "+e.target.src,d,d)}function i(e){n(e,"imageLoad","Image loaded")}function r(e){n(e,"imageLoadFailed","Image load failed")}function a(e){Oe("mutationObserver","mutationObserver: "+e[0].target+" "+e[0].type),e.forEach(t)}var u=[],c=window.MutationObserver||window.WebKitMutationObserver,s=function(){var e=document.querySelector("body");return s=new c(a),ie("Create body MutationObserver"),s.observe(e,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}),s}();return{disconnect:function(){"disconnect"in s&&(ie("Disconnect body MutationObserver"),s.disconnect(),u.forEach(o))}}}():(ie("MutationObserver not supported in this browser!"),ge())}()):ie("Auto Resize disabled")}function ge(){0!==b&&(ie("setInterval: "+b+"ms"),w=setInterval(function(){Oe("interval","setInterval: "+b)},Math.abs(b)))}function pe(e,t){var n=0;return t=t||document.body,n=null!==(n=document.defaultView.getComputedStyle(t,null))?n[e]:0,parseInt(n,o)}function ve(e,t){for(var n=t.length,o=0,i=0,r=ne(e),a=G(),u=0;u<n;u++)i<(o=t[u].getBoundingClientRect()[e]+pe("margin"+r,t[u]))&&(i=o);return a=G()-a,ie("Parsed "+n+" HTML elements"),ie("Element position calculated in "+a+"ms"),function(e){R/2<e&&ie("Event throttle increased to "+(R=2*e)+"ms")}(a),i}function ye(e){return[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll()]}function be(e,t){var n=document.querySelectorAll("["+t+"]");return 0===n.length&&(re("No tagged elements ("+t+") found on page"),document.querySelectorAll("body *")),ve(e,n)}function we(){return document.querySelectorAll("body *")}function Te(e,t,n,o){var i,r;function a(e,t){return!(Math.abs(e-t)<=z)}i=d!==n?n:Z[g](),r=d!==o?o:$[F](),a(m,i)||c&&a(x,r)||"init"===e?(Se(),Ne(m=i,x=r,e)):e in{init:1,interval:1,size:1}||!(g in M||c&&F in M)?e in{interval:1}||ie("No change in size detected"):Ie(t)}function Ee(){Y=G(),X=null,Q=U.apply(V,K),X||(V=K=null)}function Oe(e,t,n,o){k&&e in s?ie("Trigger event cancelled: "+e):(e in{reset:1,resetPage:1,init:1}||ie("Trigger event: "+t),"init"===e?Te(e,t,n,o):_(e,t,n,o))}function Se(){k||(k=!0,ie("Trigger event lock on")),clearTimeout(e),e=setTimeout(function(){k=!1,ie("Trigger event lock off"),ie("--")},l)}function Me(e){m=Z[g](),x=$[F](),Ne(m,x,e)}function Ie(e){var t=g;g=h,ie("Reset trigger event: "+e),Se(),Me("reset"),g=t}function Ne(e,t,n,o,i){var r;!0===N&&(d===i?i=C:ie("Message targetOrigin: "+i),ie("Sending message to host page ("+(r=S+":"+(e+":"+t)+":"+n+(d!==o?":"+o:""))+")"),A.postMessage(E+r,i))}function Ae(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}}();
11
+ !function(a){if("undefined"!=typeof window){var r=!0,P="",u=0,c="",s=null,D="",d=!1,j={resize:1,click:1},l=128,q=!0,f=1,n="bodyOffset",m=n,H=!0,W="",h={},g=32,B=null,p=!1,v=!1,y="[iFrameSizer]",J=y.length,w="",U={max:1,min:1,bodyScroll:1,documentElementScroll:1},b="child",V=!0,X=window.parent,T="*",E=0,i=!1,Y=null,O=16,S=1,K="scroll",M=K,Q=window,G=function(){x("onMessage function not defined")},Z=function(){},$=function(){},_={height:function(){return x("Custom height calculation function not defined"),document.documentElement.offsetHeight},width:function(){return x("Custom width calculation function not defined"),document.body.scrollWidth}},ee={},te=!1;try{var ne=Object.create({},{passive:{get:function(){te=!0}}});window.addEventListener("test",ae,ne),window.removeEventListener("test",ae,ne)}catch(e){}var oe,o,I,ie,N,A,C={bodyOffset:function(){return document.body.offsetHeight+ye("marginTop")+ye("marginBottom")},offset:function(){return C.bodyOffset()},bodyScroll:function(){return document.body.scrollHeight},custom:function(){return _.height()},documentElementOffset:function(){return document.documentElement.offsetHeight},documentElementScroll:function(){return document.documentElement.scrollHeight},max:function(){return Math.max.apply(null,e(C))},min:function(){return Math.min.apply(null,e(C))},grow:function(){return C.max()},lowestElement:function(){return Math.max(C.bodyOffset()||C.documentElementOffset(),we("bottom",Te()))},taggedElement:function(){return be("bottom","data-iframe-height")}},z={bodyScroll:function(){return document.body.scrollWidth},bodyOffset:function(){return document.body.offsetWidth},custom:function(){return _.width()},documentElementScroll:function(){return document.documentElement.scrollWidth},documentElementOffset:function(){return document.documentElement.offsetWidth},scroll:function(){return Math.max(z.bodyScroll(),z.documentElementScroll())},max:function(){return Math.max.apply(null,e(z))},min:function(){return Math.min.apply(null,e(z))},rightMostElement:function(){return we("right",Te())},taggedElement:function(){return be("right","data-iframe-width")}},re=(oe=Ee,N=null,A=0,function(){var e=Date.now(),t=O-(e-(A=A||e));return o=this,I=arguments,t<=0||O<t?(N&&(clearTimeout(N),N=null),A=e,ie=oe.apply(o,I),N||(o=I=null)):N=N||setTimeout(Oe,t),ie});k(window,"message",function(t){var n={init:function(){W=t.data,X=t.source,se(),q=!1,setTimeout(function(){H=!1},l)},reset:function(){H?R("Page reset ignored by init"):(R("Page size reset by host page"),Me("resetPage"))},resize:function(){L("resizeParent","Parent window requested size check")},moveToAnchor:function(){h.findTarget(i())},inPageLink:function(){this.moveToAnchor()},pageInfo:function(){var e=i();R("PageInfoFromParent called from parent: "+e),$(JSON.parse(e)),R(" --")},message:function(){var e=i();R("onMessage called from parent: "+e),G(JSON.parse(e)),R(" --")}};function o(){return t.data.split("]")[1].split(":")[0]}function i(){return t.data.slice(t.data.indexOf(":")+1)}function r(){return t.data.split(":")[2]in{true:1,false:1}}function e(){var e=o();e in n?n[e]():("undefined"==typeof module||!module.exports)&&"iFrameResize"in window||window.jQuery!==a&&"iFrameResize"in window.jQuery.prototype||r()||x("Unexpected message ("+t.data+")")}y===(""+t.data).slice(0,J)&&(!1===q?e():r()?n.init():R('Ignored message of type "'+o()+'". Received before initialization.'))}),k(window,"readystatechange",Ne),Ne()}function ae(){}function k(e,t,n,o){e.addEventListener(t,n,!!te&&(o||{}))}function ue(e){return e.charAt(0).toUpperCase()+e.slice(1)}function ce(e){return y+"["+w+"] "+e}function R(e){p&&"object"==typeof window.console&&console.log(ce(e))}function x(e){"object"==typeof window.console&&console.warn(ce(e))}function se(){function e(e){return"true"===e}function t(e,t){return"function"==typeof e&&(R("Setup custom "+t+"CalcMethod"),_[t]=e,e="custom"),e}{var n;n=W.slice(J).split(":"),w=n[0],u=a===n[1]?u:Number(n[1]),d=a===n[2]?d:e(n[2]),p=a===n[3]?p:e(n[3]),g=a===n[4]?g:Number(n[4]),r=a===n[6]?r:e(n[6]),c=n[7],m=a===n[8]?m:n[8],P=n[9],D=n[10],E=a===n[11]?E:Number(n[11]),h.enable=a!==n[12]&&e(n[12]),b=a===n[13]?b:n[13],M=a===n[14]?M:n[14],v=a===n[15]?v:e(n[15]),R("Initialising iFrame ("+window.location.href+")"),"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(n=window.iFrameResizer,R("Reading data from page: "+JSON.stringify(n)),Object.keys(n).forEach(de,n),G="onMessage"in n?n.onMessage:G,Z="onReady"in n?n.onReady:Z,T="targetOrigin"in n?n.targetOrigin:T,m="heightCalculationMethod"in n?n.heightCalculationMethod:m,M="widthCalculationMethod"in n?n.widthCalculationMethod:M,m=t(m,"height"),M=t(M,"width"))}function o(e){F(0,0,e.type,e.screenY+":"+e.screenX)}function i(e,t){R("Add event listener: "+t),k(window.document,e,o)}R("TargetOrigin for parent set to: "+T),le("margin",function(e,t){-1!==t.indexOf("-")&&(x("Negative CSS value ignored for "+e),t="");return t}("margin",c=a===c?u+"px":c)),le("background",P),le("padding",D),(n=document.createElement("div")).style.clear="both",n.style.display="block",n.style.height="0",document.body.appendChild(n),he(),ge(),document.documentElement.style.height="",document.body.style.height="",R('HTML & body height set to "auto"'),R("Enable public methods"),Q.parentIFrame={autoResize:function(e){return!0===e&&!1===r?(r=!0,pe()):!1===e&&!0===r&&(r=!1,fe("remove"),null!==s&&s.disconnect(),clearInterval(B)),F(0,0,"autoResize",JSON.stringify(r)),r},close:function(){F(0,0,"close")},getId:function(){return w},getPageInfo:function(e){"function"==typeof e?($=e,F(0,0,"pageInfo")):($=function(){},F(0,0,"pageInfoStop"))},moveToAnchor:function(e){h.findTarget(e)},reset:function(){Ie("parentIFrame.reset")},scrollTo:function(e,t){F(t,e,"scrollTo")},scrollToOffset:function(e,t){F(t,e,"scrollToOffset")},sendMessage:function(e,t){F(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod:function(e){m=e,he()},setWidthCalculationMethod:function(e){M=e,ge()},setTargetOrigin:function(e){R("Set targetOrigin: "+e),T=e},size:function(e,t){L("size","parentIFrame.size("+((e||"")+(t?","+t:""))+")",e,t)}},!0===v&&(i("mouseenter","Mouse Enter"),i("mouseleave","Mouse Leave")),pe(),h=function(){function n(e){var e=e.getBoundingClientRect(),t={x:window.pageXOffset===a?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===a?document.documentElement.scrollTop:window.pageYOffset};return{x:parseInt(e.left,10)+parseInt(t.x,10),y:parseInt(e.top,10)+parseInt(t.y,10)}}function o(e){var e=e.split("#")[1]||e,t=decodeURIComponent(e),t=document.getElementById(t)||document.getElementsByName(t)[0];a===t?(R("In page link (#"+e+") not found in iFrame, so sending to parent"),F(0,0,"inPageLink","#"+e)):(t=n(t=t),R("Moving to in page link (#"+e+") at x: "+t.x+" y: "+t.y),F(t.y,t.x,"scrollToOffset"))}function e(){var e=window.location.hash,t=window.location.href;""!==e&&"#"!==e&&o(t)}function t(){Array.prototype.forEach.call(document.querySelectorAll('a[href^="#"]'),function(e){"#"!==e.getAttribute("href")&&k(e,"click",function(e){e.preventDefault(),o(this.getAttribute("href"))})})}function i(){Array.prototype.forEach&&document.querySelectorAll?(R("Setting up location.hash handlers"),t(),k(window,"hashchange",e),setTimeout(e,l)):x("In page linking not fully supported in this browser! (See README.md for IE8 workaround)")}h.enable?i():R("In page linking not enabled");return{findTarget:o}}(),L("init","Init message from host page"),Z()}function de(e){var t=e.split("Callback");2===t.length&&(this[t="on"+t[0].charAt(0).toUpperCase()+t[0].slice(1)]=this[e],delete this[e],x("Deprecated: '"+e+"' has been renamed '"+t+"'. The old method will be removed in the next major version."))}function le(e,t){a!==t&&""!==t&&"null"!==t&&R("Body "+e+' set to "'+(document.body.style[e]=t)+'"')}function t(n){var e={add:function(e){function t(){L(n.eventName,n.eventType)}ee[e]=t,k(window,e,t,{passive:!0})},remove:function(e){var t=ee[e];delete ee[e],window.removeEventListener(e,t,!1)}};n.eventNames&&Array.prototype.map?(n.eventName=n.eventNames[0],n.eventNames.map(e[n.method])):e[n.method](n.eventName),R(ue(n.method)+" event listener: "+n.eventType)}function fe(e){t({method:e,eventType:"Animation Start",eventNames:["animationstart","webkitAnimationStart"]}),t({method:e,eventType:"Animation Iteration",eventNames:["animationiteration","webkitAnimationIteration"]}),t({method:e,eventType:"Animation End",eventNames:["animationend","webkitAnimationEnd"]}),t({method:e,eventType:"Input",eventName:"input"}),t({method:e,eventType:"Mouse Up",eventName:"mouseup"}),t({method:e,eventType:"Mouse Down",eventName:"mousedown"}),t({method:e,eventType:"Orientation Change",eventName:"orientationchange"}),t({method:e,eventType:"Print",eventNames:["afterprint","beforeprint"]}),t({method:e,eventType:"Ready State Change",eventName:"readystatechange"}),t({method:e,eventType:"Touch Start",eventName:"touchstart"}),t({method:e,eventType:"Touch End",eventName:"touchend"}),t({method:e,eventType:"Touch Cancel",eventName:"touchcancel"}),t({method:e,eventType:"Transition Start",eventNames:["transitionstart","webkitTransitionStart","MSTransitionStart","oTransitionStart","otransitionstart"]}),t({method:e,eventType:"Transition Iteration",eventNames:["transitioniteration","webkitTransitionIteration","MSTransitionIteration","oTransitionIteration","otransitioniteration"]}),t({method:e,eventType:"Transition End",eventNames:["transitionend","webkitTransitionEnd","MSTransitionEnd","oTransitionEnd","otransitionend"]}),"child"===b&&t({method:e,eventType:"IFrame Resized",eventName:"resize"})}function me(e,t,n,o){return t!==e&&(e in n||(x(e+" is not a valid option for "+o+"CalculationMethod."),e=t),R(o+' calculation method set to "'+e+'"')),e}function he(){m=me(m,n,C,"height")}function ge(){M=me(M,K,z,"width")}function pe(){var e;!0===r?(fe("add"),e=g<0,window.MutationObserver||window.WebKitMutationObserver?e?ve():s=function(){function t(e){function t(e){!1===e.complete&&(R("Attach listeners to "+e.src),e.addEventListener("load",i,!1),e.addEventListener("error",r,!1),u.push(e))}"attributes"===e.type&&"src"===e.attributeName?t(e.target):"childList"===e.type&&Array.prototype.forEach.call(e.target.querySelectorAll("img"),t)}function o(e){R("Remove listeners from "+e.src),e.removeEventListener("load",i,!1),e.removeEventListener("error",r,!1),u.splice(u.indexOf(e),1)}function n(e,t,n){o(e.target),L(t,n+": "+e.target.src)}function i(e){n(e,"imageLoad","Image loaded")}function r(e){n(e,"imageLoadFailed","Image load failed")}function a(e){L("mutationObserver","mutationObserver: "+e[0].target+" "+e[0].type),e.forEach(t)}var u=[],c=window.MutationObserver||window.WebKitMutationObserver,s=function(){var e=document.querySelector("body");return s=new c(a),R("Create body MutationObserver"),s.observe(e,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}),s}();return{disconnect:function(){"disconnect"in s&&(R("Disconnect body MutationObserver"),s.disconnect(),u.forEach(o))}}}():(R("MutationObserver not supported in this browser!"),ve())):R("Auto Resize disabled")}function ve(){0!==g&&(R("setInterval: "+g+"ms"),B=setInterval(function(){L("interval","setInterval: "+g)},Math.abs(g)))}function ye(e,t){return t=t||document.body,t=null===(t=document.defaultView.getComputedStyle(t,null))?0:t[e],parseInt(t,10)}function we(e,t){for(var n,o=t.length,i=0,r=ue(e),a=Date.now(),u=0;u<o;u++)i<(n=t[u].getBoundingClientRect()[e]+ye("margin"+r,t[u]))&&(i=n);return a=Date.now()-a,R("Parsed "+o+" HTML elements"),R("Element position calculated in "+a+"ms"),O/2<(a=a)&&R("Event throttle increased to "+(O=2*a)+"ms"),i}function e(e){return[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll()]}function be(e,t){var n=document.querySelectorAll("["+t+"]");return 0===n.length&&(x("No tagged elements ("+t+") found on page"),document.querySelectorAll("body *")),we(e,n)}function Te(){return document.querySelectorAll("body *")}function Ee(e,t,n,o){function i(){e in{init:1,interval:1,size:1}||!(m in U||d&&M in U)?e in{interval:1}||R("No change in size detected"):Ie(t)}function r(e,t){return!(Math.abs(e-t)<=E)}n=a===n?C[m]():n,o=a===o?z[M]():o,r(f,n)||d&&r(S,o)||"init"===e?(Se(),F(f=n,S=o,e)):i()}function Oe(){A=Date.now(),N=null,ie=oe.apply(o,I),N||(o=I=null)}function L(e,t,n,o){i&&e in j?R("Trigger event cancelled: "+e):(e in{reset:1,resetPage:1,init:1}||R("Trigger event: "+t),("init"===e?Ee:re)(e,t,n,o))}function Se(){i||(i=!0,R("Trigger event lock on")),clearTimeout(Y),Y=setTimeout(function(){i=!1,R("Trigger event lock off"),R("--")},l)}function Me(e){f=C[m](),S=z[M](),F(f,S,e)}function Ie(e){var t=m;m=n,R("Reset trigger event: "+e),Se(),Me("reset"),m=t}function F(e,t,n,o,i){!0===V&&(a===i?i=T:R("Message targetOrigin: "+i),R("Sending message to host page ("+(e=w+":"+(e+":"+t)+":"+n+(a===o?"":":"+o))+")"),X.postMessage(y+e,i))}function Ne(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}}();