inferno_core 0.6.15 → 0.6.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: be97c34b62bf28dc41266ecc22d01ccb2b8548a75150507ea72fff5aa76f6b17
4
- data.tar.gz: 2f4121330b353d2f425e1be20f3895a1f256b8f20a825cc5c26adc9aa85f0898
3
+ metadata.gz: 4f5e1cae1c23852f0f5cab017eb7b1fc361fce08f53c7ad1cc47859a0a3546ab
4
+ data.tar.gz: 34be067581780bca55ae925bfaae31bd56a6f6ed864774b915f0ac9147d426e1
5
5
  SHA512:
6
- metadata.gz: eded37149214782930c42e8e672e768eaf0e07411fba2ad9e8f96fad282ff0ff31aee18cab668592ea355a6ddafdfd1c4128d1c04de639e24aa3968a79026ac7
7
- data.tar.gz: 4322a86fc7f289cfc3cc92e70d0926c7dd79a3ce6941f8479c6096ffdcd3718a7f59e17479031d50e2a0a24cbc0e6bd632e8c31ec9cf00fdad317351176524f4
6
+ metadata.gz: 8e082414599d3d7c9d84129cfa78a4cafb3fcf3a3df1f4aec586119cfc67c234d183374256545217a827c916ca16bcdbe2bd3955dc1149383871e31247260aed
7
+ data.tar.gz: 5ca8d4645f9667cba2e2ef92c9690a947d2e70027537f57bbedb4bb239742c01c95d6c3e853367b4840d58cdb728f3c89aa671e5bfaff75a3e85be284b3fde15
@@ -112,7 +112,7 @@ module Inferno
112
112
  Inferno::DSL::FHIRResourceValidation::Validator.new(:default, 'evaluator_cli') do
113
113
  igs(ig_path)
114
114
 
115
- cli_context do
115
+ validation_context do
116
116
  # For our purposes, code display mismatches should be warnings and not affect profile conformance
117
117
  displayWarnings(true)
118
118
  end
@@ -15,8 +15,6 @@ module Inferno
15
15
 
16
16
  require_relative '../../../inferno'
17
17
 
18
- Inferno::Application.start(:requirements)
19
-
20
18
  RequirementsExporter.new.run
21
19
  end
22
20
 
@@ -128,36 +128,36 @@ module Inferno
128
128
  @old_requirements_csv ||= File.read(requirements_output_file_path)
129
129
  end
130
130
 
131
- def missing_sub_requirements
132
- @missing_sub_requirements =
131
+ def missing_subrequirements
132
+ @missing_subrequirements =
133
133
  {}.tap do |missing_requirements|
134
134
  repo = Inferno::Repositories::Requirements.new
135
135
 
136
136
  input_requirement_sets
137
137
  .each do |requirement_set, requirements|
138
138
  requirements.each do |requirement_hash|
139
- missing_sub_requirements =
139
+ missing_subrequirements =
140
140
  Inferno::Entities::Requirement.expand_requirement_ids(requirement_hash['Sub-Requirement(s)'])
141
141
  .reject { |requirement_id| repo.exists? requirement_id }
142
142
 
143
- missing_sub_requirements += missing_actor_sub_requirements(requirement_hash['Sub-Requirement(s)'])
143
+ missing_subrequirements += missing_actor_subrequirements(requirement_hash['Sub-Requirement(s)'])
144
144
 
145
- next if missing_sub_requirements.blank?
145
+ next if missing_subrequirements.blank?
146
146
 
147
147
  id = "#{requirement_set}@#{requirement_hash['ID*']}"
148
148
 
149
- missing_requirements[id] = missing_sub_requirements
149
+ missing_requirements[id] = missing_subrequirements
150
150
  end
151
151
  end
152
152
  end
153
153
  end
154
154
 
155
- def missing_actor_sub_requirements(sub_requirement_string)
156
- return [] if sub_requirement_string.blank?
155
+ def missing_actor_subrequirements(subrequirement_string)
156
+ return [] if subrequirement_string.blank?
157
157
 
158
- return [] unless sub_requirement_string.include? '#'
158
+ return [] unless subrequirement_string.include? '#'
159
159
 
160
- sub_requirement_string
160
+ subrequirement_string
161
161
  .split(',')
162
162
  .map(&:strip)
163
163
  .select { |requirement_string| requirement_string.include? '#' }
@@ -166,11 +166,11 @@ module Inferno
166
166
  end
167
167
  end
168
168
 
169
- def check_sub_requirements
170
- return if missing_sub_requirements.blank?
169
+ def check_subrequirements
170
+ return if missing_subrequirements.blank?
171
171
 
172
- missing_sub_requirements.each do |id, sub_requirement_ids|
173
- puts "#{id} is missing the following sub-requirements:\n #{sub_requirement_ids.join(', ')}"
172
+ missing_subrequirements.each do |id, subrequirement_ids|
173
+ puts "#{id} is missing the following sub-requirements:\n #{subrequirement_ids.join(', ')}"
174
174
  end
175
175
  end
176
176
 
@@ -196,7 +196,9 @@ module Inferno
196
196
  File.write(requirements_output_file_path, new_requirements_csv, encoding: Encoding::UTF_8)
197
197
  end
198
198
 
199
- check_sub_requirements
199
+ Inferno::Application.start(:requirements)
200
+
201
+ check_subrequirements
200
202
 
201
203
  puts 'Done.'
202
204
  end
@@ -228,9 +230,9 @@ module Inferno
228
230
  exit(1)
229
231
  end
230
232
 
231
- check_sub_requirements
233
+ check_subrequirements
232
234
 
233
- return if missing_sub_requirements.blank?
235
+ return if missing_subrequirements.blank?
234
236
 
235
237
  exit(1)
236
238
  end
@@ -51,17 +51,13 @@ module Inferno
51
51
  put '/:id/check_configuration',
52
52
  to: Inferno::Web::Controllers::TestSuites::CheckConfiguration,
53
53
  as: :check_configuration
54
- if Feature.requirements_enabled?
55
- get ':id/requirements',
56
- to: Inferno::Web::Controllers::TestSuites::Requirements::Index,
57
- as: :requirements
58
- end
54
+ get ':id/requirements',
55
+ to: Inferno::Web::Controllers::TestSuites::Requirements::Index,
56
+ as: :requirements
59
57
  end
60
58
 
61
- if Feature.requirements_enabled?
62
- scope 'requirements' do
63
- get '/:id', to: Inferno::Web::Controllers::Requirements::Show, as: :show
64
- end
59
+ scope 'requirements' do
60
+ get '/:id', to: Inferno::Web::Controllers::Requirements::Show, as: :show
65
61
  end
66
62
 
67
63
  get '/requests/:id', to: Inferno::Web::Controllers::Requests::Show, as: :requests_show
@@ -9,7 +9,7 @@ module Inferno
9
9
  field :requirement
10
10
  field :conformance
11
11
  field :actors
12
- field :sub_requirements
12
+ field :subrequirements
13
13
  field :conditionality
14
14
  field :url, if: :field_present?
15
15
  field :not_tested_reason, if: :field_present?
@@ -14,12 +14,6 @@ module Inferno
14
14
  result.send(name).present?
15
15
  end
16
16
  end
17
-
18
- # When removing the feature flag, replace all instances of this method
19
- # with `.field_present?`
20
- def self.field_present_and_requirements_enabled?(field_name, result, options)
21
- field_present?(field_name, result, options) && Feature.requirements_enabled?
22
- end
23
17
  end
24
18
  end
25
19
  end
@@ -20,7 +20,7 @@ module Inferno
20
20
  field :input_instructions
21
21
  field :user_runnable?, name: :user_runnable
22
22
  field :optional?, name: :optional
23
- field :verifies_requirements, if: :field_present_and_requirements_enabled?
23
+ field :verifies_requirements, if: :field_present?
24
24
  end
25
25
  end
26
26
  end
@@ -32,7 +32,7 @@ module Inferno
32
32
  Input.render_as_hash(group.available_inputs(suite_options).values)
33
33
  end
34
34
  field :output_definitions, name: :outputs, extractor: HashValueExtractor
35
- field :verifies_requirements, if: :field_present_and_requirements_enabled?
35
+ field :verifies_requirements, if: :field_present?
36
36
  end
37
37
  end
38
38
  end
@@ -38,7 +38,7 @@ module Inferno
38
38
  suite_options = options[:suite_options]
39
39
  Input.render_as_hash(suite.available_inputs(suite_options).values)
40
40
  end
41
- field :requirement_sets, if: :field_present_and_requirements_enabled? do |suite, options|
41
+ field :requirement_sets, if: :field_present? do |suite, options|
42
42
  selected_options = options[:suite_options] || []
43
43
  requirement_sets = suite.requirement_sets.select do |requirement_set|
44
44
  requirement_set.suite_options.all? { |suite_option| selected_options.include? suite_option }
@@ -46,7 +46,7 @@ module Inferno
46
46
 
47
47
  RequirementSet.render_as_hash(requirement_sets)
48
48
  end
49
- field :verifies_requirements, if: :field_present_and_requirements_enabled?
49
+ field :verifies_requirements, if: :field_present?
50
50
  end
51
51
  end
52
52
  end
@@ -147,7 +147,7 @@ module Inferno
147
147
  end
148
148
 
149
149
  def matching_pattern_identifier_slice?(slice, discriminator)
150
- slice.identifier.system == discriminator[:system]
150
+ slice.system == discriminator[:system]
151
151
  end
152
152
 
153
153
  def matching_value_slice?(slice, discriminator)
@@ -1,4 +1,5 @@
1
1
  require_relative '../ext/fhir_models'
2
+ require_relative '../feature'
2
3
  module Inferno
3
4
  module DSL
4
5
  # This module contains the methods needed to configure a validator to
@@ -19,7 +20,7 @@ module Inferno
19
20
  # { type: 'info', message: 'everything is ok' }
20
21
  # end
21
22
  # end
22
- # cli_context do
23
+ # validation_context do
23
24
  # noExtensibleBindingMessages true
24
25
  # allowExampleUrls true
25
26
  # txServer nil
@@ -74,12 +75,12 @@ module Inferno
74
75
  # igs("hl7.fhir.us.core#3.1.1", "hl7.fhir.us.core#6.0.0")
75
76
  # @param validator_igs [Array<String>]
76
77
  def igs(*validator_igs)
77
- cli_context(igs: validator_igs) if validator_igs.any?
78
+ validation_context(igs: validator_igs) if validator_igs.any?
78
79
 
79
- cli_context.igs
80
+ validation_context.igs
80
81
  end
81
82
 
82
- # Set the cliContext used as part of each validation request.
83
+ # Set the validationContext used as part of each validation request.
83
84
  # Fields may be passed as either a Hash or block.
84
85
  # Note that all fields included here will be sent directly in requests,
85
86
  # there is no check that the fields are correct.
@@ -88,7 +89,7 @@ module Inferno
88
89
  # # Passing fields in a block
89
90
  # fhir_resource_validator do
90
91
  # url 'http://example.com/validator'
91
- # cli_context do
92
+ # validation_context do
92
93
  # noExtensibleBindingMessages true
93
94
  # allowExampleUrls true
94
95
  # txServer nil
@@ -99,7 +100,7 @@ module Inferno
99
100
  # # Passing fields in a Hash
100
101
  # fhir_resource_validator do
101
102
  # url 'http://example.org/validator'
102
- # cli_context({
103
+ # validation_context({
103
104
  # noExtensibleBindingMessages: true,
104
105
  # allowExampleUrls: true,
105
106
  # txServer: nil
@@ -107,19 +108,21 @@ module Inferno
107
108
  # end
108
109
  #
109
110
  # @param definition [Hash] raw fields to set, optional
110
- def cli_context(definition = nil, &)
111
- if @cli_context
111
+ def validation_context(definition = nil, &)
112
+ if @validation_context
112
113
  if definition
113
- @cli_context.definition.merge!(definition.deep_symbolize_keys)
114
+ @validation_context.definition.merge!(definition.deep_symbolize_keys)
114
115
  elsif block_given?
115
- @cli_context.instance_eval(&)
116
+ @validation_context.instance_eval(&)
116
117
  end
117
118
  else
118
- @cli_context = CliContext.new(definition || {}, &)
119
+ @validation_context = ValidationContext.new(definition || {}, &)
119
120
  end
120
- @cli_context
121
+ @validation_context
121
122
  end
122
123
 
124
+ alias cli_context validation_context
125
+
123
126
  # @private
124
127
  def additional_validations
125
128
  @additional_validations ||= []
@@ -268,9 +271,13 @@ module Inferno
268
271
 
269
272
  @session_id = validator_session_id if validator_session_id
270
273
 
274
+ # HL7 Validator Core 6.5.19+ renamed `cliContext` to `validationContext`.
275
+ # This allows backward compatibility until the validator-wrapper is updated.
276
+ context_key = Feature.use_validation_context_key? ? :validationContext : :cliContext
277
+
271
278
  wrapped_resource = {
272
- cliContext: {
273
- **cli_context.definition,
279
+ context_key => {
280
+ **validation_context.definition,
274
281
  profiles: [profile_url]
275
282
  },
276
283
  filesToValidate: [
@@ -365,10 +372,10 @@ module Inferno
365
372
  end
366
373
 
367
374
  # @private
368
- class CliContext
375
+ class ValidationContext
369
376
  attr_reader :definition
370
377
 
371
- CLICONTEXT_DEFAULTS = {
378
+ VALIDATIONCONTEXT_DEFAULTS = {
372
379
  sv: '4.0.1',
373
380
  doNative: false,
374
381
  extensions: ['any'],
@@ -377,13 +384,13 @@ module Inferno
377
384
 
378
385
  # @private
379
386
  def initialize(definition, &)
380
- @definition = CLICONTEXT_DEFAULTS.merge(definition.deep_symbolize_keys)
387
+ @definition = VALIDATIONCONTEXT_DEFAULTS.merge(definition.deep_symbolize_keys)
381
388
  instance_eval(&) if block_given?
382
389
  end
383
390
 
384
391
  # @private
385
392
  def method_missing(method_name, *args)
386
- # Interpret any other method as setting a field on cliContext.
393
+ # Interpret any other method as setting a field on validationContext.
387
394
  # Follow the same format as `Validator.url` here:
388
395
  # only set the value if one is provided.
389
396
  # args will be an empty array if no value is provided.
@@ -3,8 +3,16 @@ module Inferno
3
3
  # This module manages and locks short IDs, ensuring that short IDs
4
4
  # remain stable and do not change unexpectedly.
5
5
  module ShortIDManager
6
- def base_short_id_file_folder
7
- File.join(Dir.pwd, 'lib', name.split('::').first.underscore)
6
+ def base_short_id_file_folder(folder = nil)
7
+ folder ||= File.dirname(Object.const_source_location(name).first)
8
+
9
+ return folder if File.exist?(File.join(folder, short_id_file_name))
10
+
11
+ return folder if File.basename(File.dirname(folder)) == 'lib'
12
+
13
+ return folder if File.dirname(folder) == folder
14
+
15
+ base_short_id_file_folder(File.dirname(folder))
8
16
  end
9
17
 
10
18
  def short_id_file_name
@@ -12,7 +20,8 @@ module Inferno
12
20
  end
13
21
 
14
22
  def short_id_file_path
15
- File.join(base_short_id_file_folder, short_id_file_name).freeze
23
+ @short_id_file_path =
24
+ File.join(base_short_id_file_folder, short_id_file_name).freeze
16
25
  end
17
26
 
18
27
  # Loads and memoizes the short ID map from the YAML file.
@@ -12,7 +12,8 @@ module Inferno
12
12
  :requirement,
13
13
  :conformance,
14
14
  :actors,
15
- :sub_requirements,
15
+ :subrequirements,
16
+ :subrequirements_string,
16
17
  :conditionality,
17
18
  :not_tested_reason,
18
19
  :not_tested_details
@@ -28,6 +29,10 @@ module Inferno
28
29
  self.requirement_set = id.split(/[@#]/).first
29
30
  end
30
31
 
32
+ def subrequirements
33
+ @subrequirements ||= self.class.expand_requirement_ids(subrequirements_string, requirement_set)
34
+ end
35
+
31
36
  # Expand a comma-delimited list of requirement id references into an Array
32
37
  # of full requirement ids
33
38
  #
@@ -62,7 +67,7 @@ module Inferno
62
67
  requirement_ids =
63
68
  if actor.present?
64
69
  return Repositories::Requirements.new.requirements_for_actor(current_set, actor).map(&:id)
65
- elsif requirement_string.include? '-'
70
+ elsif requirement_string.include?('-') && !requirement_string.match?(/[^\d\-]/)
66
71
  start_id, end_id = requirement_string.split('-')
67
72
  if start_id.match?(/^\d+$/) && end_id.match?(/^\d+$/)
68
73
  (start_id..end_id).to_a
@@ -1,8 +1,8 @@
1
1
  module Inferno
2
2
  module Feature
3
3
  class << self
4
- def requirements_enabled?
5
- ENV.fetch('ENABLE_REQUIREMENTS', 'false')&.casecmp?('true')
4
+ def use_validation_context_key?
5
+ ENV.fetch('USE_VALIDATION_CONTEXT', 'false')&.casecmp?('true')
6
6
  end
7
7
  end
8
8
  end
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkinferno_web_app=self.webpackChunkinferno_web_app||[]).push([[237],{237:(e,n,t)=>{t.r(n),t.d(n,{CLSThresholds:()=>P,FCPThresholds:()=>w,FIDThresholds:()=>ne,INPThresholds:()=>j,LCPThresholds:()=>G,TTFBThresholds:()=>Q,onCLS:()=>A,onFCP:()=>I,onFID:()=>te,onINP:()=>z,onLCP:()=>K,onTTFB:()=>V});var r,i,o,a,c,u=-1,s=function(e){addEventListener("pageshow",(function(n){n.persisted&&(u=n.timeStamp,e(n))}),!0)},f=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},d=function(){var e=f();return e&&e.activationStart||0},l=function(e,n){var t=f(),r="navigate";return u>=0?r="back-forward-cache":t&&(document.prerendering||d()>0?r="prerender":document.wasDiscarded?r="restore":t.type&&(r=t.type.replace(/_/g,"-"))),{name:e,value:void 0===n?-1:n,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},p=function(e,n,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){Promise.resolve().then((function(){n(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},t||{})),r}}catch(e){}},v=function(e,n,t,r){var i,o;return function(a){n.value>=0&&(a||r)&&((o=n.value-(i||0))||void 0===i)&&(i=n.value,n.delta=o,n.rating=function(e,n){return e>n[1]?"poor":e>n[0]?"needs-improvement":"good"}(n.value,t),e(n))}},m=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},h=function(e){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e()}))},g=function(e){var n=!1;return function(){n||(e(),n=!0)}},T=-1,y=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},E=function(e){"hidden"===document.visibilityState&&T>-1&&(T="visibilitychange"===e.type?e.timeStamp:0,b())},C=function(){addEventListener("visibilitychange",E,!0),addEventListener("prerenderingchange",E,!0)},b=function(){removeEventListener("visibilitychange",E,!0),removeEventListener("prerenderingchange",E,!0)},L=function(){return T<0&&(T=y(),C(),s((function(){setTimeout((function(){T=y(),C()}),0)}))),{get firstHiddenTime(){return T}}},S=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},w=[1800,3e3],I=function(e,n){n=n||{},S((function(){var t,r=L(),i=l("FCP"),o=p("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime<r.firstHiddenTime&&(i.value=Math.max(e.startTime-d(),0),i.entries.push(e),t(!0)))}))}));o&&(t=v(e,i,w,n.reportAllChanges),s((function(r){i=l("FCP"),t=v(e,i,w,n.reportAllChanges),m((function(){i.value=performance.now()-r.timeStamp,t(!0)}))})))}))},P=[.1,.25],A=function(e,n){n=n||{},I(g((function(){var t,r=l("CLS",0),i=0,o=[],a=function(e){e.forEach((function(e){if(!e.hadRecentInput){var n=o[0],t=o[o.length-1];i&&e.startTime-t.startTime<1e3&&e.startTime-n.startTime<5e3?(i+=e.value,o.push(e)):(i=e.value,o=[e])}})),i>r.value&&(r.value=i,r.entries=o,t())},c=p("layout-shift",a);c&&(t=v(e,r,P,n.reportAllChanges),h((function(){a(c.takeRecords()),t(!0)})),s((function(){i=0,r=l("CLS",0),t=v(e,r,P,n.reportAllChanges),m((function(){return t()}))})),setTimeout(t,0))})))},F=0,k=1/0,M=0,D=function(e){e.forEach((function(e){e.interactionId&&(k=Math.min(k,e.interactionId),M=Math.max(M,e.interactionId),F=M?(M-k)/7+1:0)}))},B=function(){return r?F:performance.interactionCount||0},R=function(){"interactionCount"in performance||r||(r=p("event",D,{type:"event",buffered:!0,durationThreshold:0}))},_=[],x=new Map,H=0,N=[],q=function(e){if(N.forEach((function(n){return n(e)})),e.interactionId||"first-input"===e.entryType){var n=_[_.length-1],t=x.get(e.interactionId);if(t||_.length<10||e.duration>n.latency){if(t)e.duration>t.latency?(t.entries=[e],t.latency=e.duration):e.duration===t.latency&&e.startTime===t.entries[0].startTime&&t.entries.push(e);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};x.set(r.id,r),_.push(r)}_.sort((function(e,n){return n.latency-e.latency})),_.length>10&&_.splice(10).forEach((function(e){return x.delete(e.id)}))}}},O=function(e){var n=self.requestIdleCallback||self.setTimeout,t=-1;return e=g(e),"hidden"===document.visibilityState?e():(t=n(e),h(e)),t},j=[200,500],z=function(e,n){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(n=n||{},S((function(){var t;R();var r,i=l("INP"),o=function(e){O((function(){e.forEach(q);var n=function(){var e=Math.min(_.length-1,Math.floor((B()-H)/50));return _[e]}();n&&n.latency!==i.value&&(i.value=n.latency,i.entries=n.entries,r())}))},a=p("event",o,{durationThreshold:null!==(t=n.durationThreshold)&&void 0!==t?t:40});r=v(e,i,j,n.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),h((function(){o(a.takeRecords()),r(!0)})),s((function(){H=B(),_.length=0,x.clear(),i=l("INP"),r=v(e,i,j,n.reportAllChanges)})))})))},G=[2500,4e3],J={},K=function(e,n){n=n||{},S((function(){var t,r=L(),i=l("LCP"),o=function(e){n.reportAllChanges||(e=e.slice(-1)),e.forEach((function(e){e.startTime<r.firstHiddenTime&&(i.value=Math.max(e.startTime-d(),0),i.entries=[e],t())}))},a=p("largest-contentful-paint",o);if(a){t=v(e,i,G,n.reportAllChanges);var c=g((function(){J[i.id]||(o(a.takeRecords()),a.disconnect(),J[i.id]=!0,t(!0))}));["keydown","click"].forEach((function(e){addEventListener(e,(function(){return O(c)}),{once:!0,capture:!0})})),h(c),s((function(r){i=l("LCP"),t=v(e,i,G,n.reportAllChanges),m((function(){i.value=performance.now()-r.timeStamp,J[i.id]=!0,t(!0)}))}))}}))},Q=[800,1800],U=function e(n){document.prerendering?S((function(){return e(n)})):"complete"!==document.readyState?addEventListener("load",(function(){return e(n)}),!0):setTimeout(n,0)},V=function(e,n){n=n||{};var t=l("TTFB"),r=v(e,t,Q,n.reportAllChanges);U((function(){var i=f();i&&(t.value=Math.max(i.responseStart-d(),0),t.entries=[i],r(!0),s((function(){t=l("TTFB",0),(r=v(e,t,Q,n.reportAllChanges))(!0)})))}))},W={passive:!0,capture:!0},X=new Date,Y=function(e,n){i||(i=n,o=e,a=new Date,ee(removeEventListener),Z())},Z=function(){if(o>=0&&o<a-X){var e={entryType:"first-input",name:i.type,target:i.target,cancelable:i.cancelable,startTime:i.timeStamp,processingStart:i.timeStamp+o};c.forEach((function(n){n(e)})),c=[]}},$=function(e){if(e.cancelable){var n=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,n){var t=function(){Y(e,n),i()},r=function(){i()},i=function(){removeEventListener("pointerup",t,W),removeEventListener("pointercancel",r,W)};addEventListener("pointerup",t,W),addEventListener("pointercancel",r,W)}(n,e):Y(n,e)}},ee=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(n){return e(n,$,W)}))},ne=[100,300],te=function(e,n){n=n||{},S((function(){var t,r=L(),a=l("FID"),u=function(e){e.startTime<r.firstHiddenTime&&(a.value=e.processingStart-e.startTime,a.entries.push(e),t(!0))},f=function(e){e.forEach(u)},d=p("first-input",f);t=v(e,a,ne,n.reportAllChanges),d&&(h(g((function(){f(d.takeRecords()),d.disconnect()}))),s((function(){var r;a=l("FID"),t=v(e,a,ne,n.reportAllChanges),c=[],o=-1,i=null,ee(addEventListener),r=u,c.push(r),Z()})))}))}}}]);
1
+ "use strict";(self.webpackChunkinferno_web_app=self.webpackChunkinferno_web_app||[]).push([[237],{237:(e,n,t)=>{t.r(n),t.d(n,{CLSThresholds:()=>P,FCPThresholds:()=>w,FIDThresholds:()=>ne,INPThresholds:()=>j,LCPThresholds:()=>G,TTFBThresholds:()=>Q,onCLS:()=>A,onFCP:()=>I,onFID:()=>te,onINP:()=>z,onLCP:()=>K,onTTFB:()=>V});var r,i,o,a,c,u=-1,s=function(e){addEventListener("pageshow",function(n){n.persisted&&(u=n.timeStamp,e(n))},!0)},f=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},d=function(){var e=f();return e&&e.activationStart||0},l=function(e,n){var t=f(),r="navigate";return u>=0?r="back-forward-cache":t&&(document.prerendering||d()>0?r="prerender":document.wasDiscarded?r="restore":t.type&&(r=t.type.replace(/_/g,"-"))),{name:e,value:void 0===n?-1:n,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},p=function(e,n,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver(function(e){Promise.resolve().then(function(){n(e.getEntries())})});return r.observe(Object.assign({type:e,buffered:!0},t||{})),r}}catch(e){}},v=function(e,n,t,r){var i,o;return function(a){n.value>=0&&(a||r)&&((o=n.value-(i||0))||void 0===i)&&(i=n.value,n.delta=o,n.rating=function(e,n){return e>n[1]?"poor":e>n[0]?"needs-improvement":"good"}(n.value,t),e(n))}},m=function(e){requestAnimationFrame(function(){return requestAnimationFrame(function(){return e()})})},h=function(e){document.addEventListener("visibilitychange",function(){"hidden"===document.visibilityState&&e()})},g=function(e){var n=!1;return function(){n||(e(),n=!0)}},T=-1,y=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},E=function(e){"hidden"===document.visibilityState&&T>-1&&(T="visibilitychange"===e.type?e.timeStamp:0,b())},C=function(){addEventListener("visibilitychange",E,!0),addEventListener("prerenderingchange",E,!0)},b=function(){removeEventListener("visibilitychange",E,!0),removeEventListener("prerenderingchange",E,!0)},L=function(){return T<0&&(T=y(),C(),s(function(){setTimeout(function(){T=y(),C()},0)})),{get firstHiddenTime(){return T}}},S=function(e){document.prerendering?addEventListener("prerenderingchange",function(){return e()},!0):e()},w=[1800,3e3],I=function(e,n){n=n||{},S(function(){var t,r=L(),i=l("FCP"),o=p("paint",function(e){e.forEach(function(e){"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime<r.firstHiddenTime&&(i.value=Math.max(e.startTime-d(),0),i.entries.push(e),t(!0)))})});o&&(t=v(e,i,w,n.reportAllChanges),s(function(r){i=l("FCP"),t=v(e,i,w,n.reportAllChanges),m(function(){i.value=performance.now()-r.timeStamp,t(!0)})}))})},P=[.1,.25],A=function(e,n){n=n||{},I(g(function(){var t,r=l("CLS",0),i=0,o=[],a=function(e){e.forEach(function(e){if(!e.hadRecentInput){var n=o[0],t=o[o.length-1];i&&e.startTime-t.startTime<1e3&&e.startTime-n.startTime<5e3?(i+=e.value,o.push(e)):(i=e.value,o=[e])}}),i>r.value&&(r.value=i,r.entries=o,t())},c=p("layout-shift",a);c&&(t=v(e,r,P,n.reportAllChanges),h(function(){a(c.takeRecords()),t(!0)}),s(function(){i=0,r=l("CLS",0),t=v(e,r,P,n.reportAllChanges),m(function(){return t()})}),setTimeout(t,0))}))},F=0,k=1/0,M=0,D=function(e){e.forEach(function(e){e.interactionId&&(k=Math.min(k,e.interactionId),M=Math.max(M,e.interactionId),F=M?(M-k)/7+1:0)})},B=function(){return r?F:performance.interactionCount||0},R=function(){"interactionCount"in performance||r||(r=p("event",D,{type:"event",buffered:!0,durationThreshold:0}))},_=[],x=new Map,H=0,N=[],q=function(e){if(N.forEach(function(n){return n(e)}),e.interactionId||"first-input"===e.entryType){var n=_[_.length-1],t=x.get(e.interactionId);if(t||_.length<10||e.duration>n.latency){if(t)e.duration>t.latency?(t.entries=[e],t.latency=e.duration):e.duration===t.latency&&e.startTime===t.entries[0].startTime&&t.entries.push(e);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};x.set(r.id,r),_.push(r)}_.sort(function(e,n){return n.latency-e.latency}),_.length>10&&_.splice(10).forEach(function(e){return x.delete(e.id)})}}},O=function(e){var n=self.requestIdleCallback||self.setTimeout,t=-1;return e=g(e),"hidden"===document.visibilityState?e():(t=n(e),h(e)),t},j=[200,500],z=function(e,n){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(n=n||{},S(function(){var t;R();var r,i=l("INP"),o=function(e){O(function(){e.forEach(q);var n=function(){var e=Math.min(_.length-1,Math.floor((B()-H)/50));return _[e]}();n&&n.latency!==i.value&&(i.value=n.latency,i.entries=n.entries,r())})},a=p("event",o,{durationThreshold:null!==(t=n.durationThreshold)&&void 0!==t?t:40});r=v(e,i,j,n.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),h(function(){o(a.takeRecords()),r(!0)}),s(function(){H=B(),_.length=0,x.clear(),i=l("INP"),r=v(e,i,j,n.reportAllChanges)}))}))},G=[2500,4e3],J={},K=function(e,n){n=n||{},S(function(){var t,r=L(),i=l("LCP"),o=function(e){n.reportAllChanges||(e=e.slice(-1)),e.forEach(function(e){e.startTime<r.firstHiddenTime&&(i.value=Math.max(e.startTime-d(),0),i.entries=[e],t())})},a=p("largest-contentful-paint",o);if(a){t=v(e,i,G,n.reportAllChanges);var c=g(function(){J[i.id]||(o(a.takeRecords()),a.disconnect(),J[i.id]=!0,t(!0))});["keydown","click"].forEach(function(e){addEventListener(e,function(){return O(c)},{once:!0,capture:!0})}),h(c),s(function(r){i=l("LCP"),t=v(e,i,G,n.reportAllChanges),m(function(){i.value=performance.now()-r.timeStamp,J[i.id]=!0,t(!0)})})}})},Q=[800,1800],U=function e(n){document.prerendering?S(function(){return e(n)}):"complete"!==document.readyState?addEventListener("load",function(){return e(n)},!0):setTimeout(n,0)},V=function(e,n){n=n||{};var t=l("TTFB"),r=v(e,t,Q,n.reportAllChanges);U(function(){var i=f();i&&(t.value=Math.max(i.responseStart-d(),0),t.entries=[i],r(!0),s(function(){t=l("TTFB",0),(r=v(e,t,Q,n.reportAllChanges))(!0)}))})},W={passive:!0,capture:!0},X=new Date,Y=function(e,n){i||(i=n,o=e,a=new Date,ee(removeEventListener),Z())},Z=function(){if(o>=0&&o<a-X){var e={entryType:"first-input",name:i.type,target:i.target,cancelable:i.cancelable,startTime:i.timeStamp,processingStart:i.timeStamp+o};c.forEach(function(n){n(e)}),c=[]}},$=function(e){if(e.cancelable){var n=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,n){var t=function(){Y(e,n),i()},r=function(){i()},i=function(){removeEventListener("pointerup",t,W),removeEventListener("pointercancel",r,W)};addEventListener("pointerup",t,W),addEventListener("pointercancel",r,W)}(n,e):Y(n,e)}},ee=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach(function(n){return e(n,$,W)})},ne=[100,300],te=function(e,n){n=n||{},S(function(){var t,r=L(),a=l("FID"),u=function(e){e.startTime<r.firstHiddenTime&&(a.value=e.processingStart-e.startTime,a.entries.push(e),t(!0))},f=function(e){e.forEach(u)},d=p("first-input",f);t=v(e,a,ne,n.reportAllChanges),d&&(h(g(function(){f(d.takeRecords()),d.disconnect()})),s(function(){var r;a=l("FID"),t=v(e,a,ne,n.reportAllChanges),c=[],o=-1,i=null,ee(addEventListener),r=u,c.push(r),Z()}))})}}}]);