1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4994],{22469:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/__dev__/tree-views",function(){return r(92115)}])},1342:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{noSSR:function(){return noSSR},default:function(){return dynamic}});let a=r(38754),l=(r(67294),a._(r(24304)));function convertModule(e){return{default:(null==e?void 0:e.default)||e}}function noSSR(e,t){return delete t.webpack,delete t.modules,e(t)}function dynamic(e,t){let r=l.default,a={loading:e=>{let{error:t,isLoading:r,pastDelay:a}=e;return null}};e instanceof Promise?a.loader=()=>e:"function"==typeof e?a.loader=e:"object"==typeof e&&(a={...a,...e}),a={...a,...t};let o=a.loader;return(a.loadableGenerated&&(a={...a,...a.loadableGenerated},delete a.loadableGenerated),"boolean"!=typeof a.ssr||a.ssr)?r({...a,loader:()=>null!=o?o().then(convertModule):Promise.resolve(convertModule(()=>null))}):(delete a.webpack,delete a.modules,noSSR(r,a))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},30043:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"LoadableContext",{enumerable:!0,get:function(){return o}});let a=r(38754),l=a._(r(67294)),o=l.default.createContext(null)},24304:function(e,t,r){"use strict";/** 2@copyright (c) 2017-present James Kyle <[email protected]> 3 MIT License 4 Permission is hereby granted, free of charge, to any person obtaining 5a copy of this software and associated documentation files (the 6"Software"), to deal in the Software without restriction, including 7without limitation the rights to use, copy, modify, merge, publish, 8distribute, sublicense, and/or sell copies of the Software, and to 9permit persons to whom the Software is furnished to do so, subject to 10the following conditions: 11 The above copyright notice and this permission notice shall be 12included in all copies or substantial portions of the Software. 13 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 14EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 15MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 16NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 17LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 18OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 19WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE 20*/Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return d}});let a=r(38754),l=a._(r(67294)),o=r(30043),n=[],s=[],i=!1;function load(e){let t=e(),r={loading:!0,loaded:null,error:null};return r.promise=t.then(e=>(r.loading=!1,r.loaded=e,e)).catch(e=>{throw r.loading=!1,r.error=e,e}),r}let LoadableSubscription=class LoadableSubscription{promise(){return this._res.promise}retry(){this._clearTimeouts(),this._res=this._loadFn(this._opts.loader),this._state={pastDelay:!1,timedOut:!1};let{_res:e,_opts:t}=this;e.loading&&("number"==typeof t.delay&&(0===t.delay?this._state.pastDelay=!0:this._delay=setTimeout(()=>{this._update({pastDelay:!0})},t.delay)),"number"==typeof t.timeout&&(this._timeout=setTimeout(()=>{this._update({timedOut:!0})},t.timeout))),this._res.promise.then(()=>{this._update({}),this._clearTimeouts()}).catch(e=>{this._update({}),this._clearTimeouts()}),this._update({})}_update(e){this._state={...this._state,error:this._res.error,loaded:this._res.loaded,loading:this._res.loading,...e},this._callbacks.forEach(e=>e())}_clearTimeouts(){clearTimeout(this._delay),clearTimeout(this._timeout)}getCurrentValue(){return this._state}subscribe(e){return this._callbacks.add(e),()=>{this._callbacks.delete(e)}}constructor(e,t){this._loadFn=e,this._opts=t,this._callbacks=new Set,this._delay=null,this._timeout=null,this.retry()}};function Loadable(e){return function(e,t){let r=Object.assign({loader:null,loading:null,delay:200,timeout:null,webpack:null,modules:null},t),a=null;
20function init(){if(!a){let t=new LoadableSubscription(e,r);a={getCurrentValue:t.getCurrentValue.bind(t),subscribe:t.subscribe.bind(t),retry:t.retry.bind(t),promise:t.promise.bind(t)}}return a.promise()}if(!i){let e=r.webpack?r.webpack():r.modules;e&&s.push(t=>{for(let r of e)if(t.includes(r))return init()})}function LoadableComponent(e,t){!function(){init();let e=l.default.useContext(o.LoadableContext);e&&Array.isArray(r.modules)&&r.modules.forEach(t=>{e(t)})}();let n=l.default.useSyncExternalStore(a.subscribe,a.getCurrentValue,a.getCurrentValue);return l.default.useImperativeHandle(t,()=>({retry:a.retry}),[]),l.default.useMemo(()=>{var t;return n.loading||n.error?l.default.createElement(r.loading,{isLoading:n.loading,pastDelay:n.pastDelay,timedOut:n.timedOut,error:n.error,retry:a.retry}):n.loaded?l.default.createElement((t=n.loaded)&&t.default?t.default:t,e):null},[e,n])}return LoadableComponent.preload=()=>init(),LoadableComponent.displayName="LoadableComponent",l.default.forwardRef(LoadableComponent)}(load,e)}function flushInitializers(e,t){let r=[];for(;e.length;){let a=e.pop();r.push(a(t))}return Promise.all(r).then(()=>{if(e.length)return flushInitializers(e,t)})}Loadable.preloadAll=()=>new Promise((e,t)=>{flushInitializers(n).then(e,t)}),Loadable.preloadReady=e=>(void 0===e&&(e=[]),new Promise(t=>{let res=()=>(i=!0,t());flushInitializers(s,e).then(res,res)})),window.__NEXT_PRELOADREADY=Loadable.preloadReady;let d=Loadable},92115:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSP:function(){return N}});var a=r(85893),l=r(67294),o=r(5152),n=r.n(o),s=r(87357),i=r(15861),d=r(15103),u=r(48583),c=r(39772),p=r(17160),h=r(75075),m=r(34346),b=r(56541);let f=n()(()=>Promise.all([r.e(1653),r.e(5931)]).then(r.bind(r,25931)),{loadableGenerated:{webpack:()=>[25931]},ssr:!1}),_=n()(()=>Promise.all([r.e(1162),r.e(711),r.e(5464),r.e(4386),r.e(8360),r.e(5230),r.e(3195)]).then(r.bind(r,5230)),{loadableGenerated:{webpack:()=>[5230]},ssr:!1}),g=n()(()=>Promise.all([r.e(2013),r.e(9570),r.e(1162),r.e(9212),r.e(1653),r.e(711),r.e(2843),r.e(5464),r.e(4386),r.e(8360),r.e(1903),r.e(7918),r.e(6178),r.e(5644),r.e(3612),r.e(9669),r.e(6550),r.e(1039),r.e(5845),r.e(5114),r.e(877),r.e(7193),r.e(5230),r.e(2388),r.e(4961)]).then(r.bind(r,2575)),{loadableGenerated:{webpack:()=>[2575]},ssr:!1}),y=n()(()=>r.e(3692).then(r.bind(r,43692)),{loadableGenerated:{webpack:()=>[43692]},ssr:!1}),x=n()(()=>Promise.all([r.e(4386),r.e(361)]).then(r.bind(r,21950)),{loadableGenerated:{webpack:()=>[21950]},ssr:!1}),S="harness-project",k="harness-spec",w={id:k,project_id:S,species:[{species_name:"Loblolly Pine",products:[{product_name:"Sawtimber",stump_height:.5,log_bolt_length:16,grades:[{code:"P1",sort_order:1},{code:"P2",sort_order:2},{code:"P3",sort_order:3}]},{product_name:"Pulpwood",stump_height:.5,log_bolt_length:8}]},{species_name:"Water Oak",products:[{product_name:"Sawtimber",stump_height:1,log_bolt_length:16}]}]},j=[{field:"species",headerName:"Species",type:"string",order:1,required:!0,input:{mode:"select",source:"spec:species",catalog:"nation_species"}},{field:"product",headerName:"Product",type:"string",order:2},{field:"dbh",headerName:"DBH",type:"number",order:3,unit:"in",required:!0},{field:"height",headerName:"Height",type:"number",order:4,unit:"ft"},{field:"stopper_height",headerName:"Stopper Ht",type:"number",order:5,unit:"ft"},{field:"stopper_height_diameter",headerName:"Stopper Dia",type:"number",order:6,unit:"in"},{field:"grade_segments",headerName:"Grade",type:"custom",order:7,editable:!1},{field:"forked",headerName:"Forked",type:"boolean",order:8},{field:"notes",headerName:"Notes",type:"string",order:9},{field:"tree_class",headerName:"Class",type:"string",order:10},{field:"age",headerName:"Age",type:"number",order:11},{field:"crown_ratio",headerName:"Crown",type:"number",order:12},{field:"rough_cull_pct",headerName:"Rough",type:"number",order:13},{field:"rotten_cull_pct",headerName:"Rotten",type:"number",order:14},{field:"damage",headerName:"Damage",type:"custom",order:15,input:{mode:"editor",source:"static",maxItems:3},options:[{code:11e3,name:"Insects"},{code:19e3,name:"Disease, general"},{code:3e4,name:"Fire"},{code:41e3,name:"Wind"}]}],v=[{id:"t1",tree_number:1,data:{species:"Loblolly Pine",product:"Sawtimber",dbh:14,height:72,tree_class:"GS",age:24,crown_ratio:40}},{id:"t2",tree_number:2,data:{species:"Loblolly Pine",product:"Sawtimber",dbh:16,stopper_height:48,stopper_height_diameter:9}},{id:"t3",tree_number:3,data:{species:"Loblolly Pine",product:"Pulpwood",dbh:12,height:64,stopper_height:40,stopper_height_diameter:8,forked:!0,rough_cull_pct:10,rotten_cull_pct:5,damage:[{agent_c
20ode:3e4,severity:50}]}},{id:"t4",tree_number:4,data:{species:"Water Oak",product:"Sawtimber",dbh:140,height:70}},{id:"t5",tree_number:5,data:{species:"Water Oak",dbh:10,notes:"leaning over the road",capture_mode:"dot_tally"}},{id:"t6",tree_number:6,data:{species:"Loblolly Pine",product:"Sawtimber",dbh:18,height:80,grade_segments:[{index:0,end_height:.5,grade_code:"Cull",percent_defect:0},{index:1,end_height:16.5,grade_code:"P1",percent_defect:0},{index:2,end_height:32.5,grade_code:"P2",percent_defect:10}]}}],P=(0,m.Rs)(j),L=(0,d.MT)();L.set(c.IQ,{[S]:[w]});let C=[{key:p.np,label:"Cards"},{key:p.Io,label:"Dot"},{key:"tally-nospec",label:"Dot \xb7 no spec"},{key:"tally-nospecies",label:"Dot \xb7 empty spec"},{key:"entry",label:"Input panel"},{key:"entry-seeded",label:"Input panel \xb7 seeded"},{key:"entry-editing",label:"Input panel \xb7 editing"},{key:"grade",label:"Stem grade"},{key:"grade-stopper",label:"Stem grade \xb7 stopper"}];var N=!0;t.default=()=>{let[e,t]=(0,l.useState)(p.np),[r,o]=(0,l.useState)([]),[n,d]=(0,l.useState)("t1"),[c,m]=(0,l.useState)(b.gS),[N,I]=(0,l.useState)([]),[O,T]=(0,l.useState)([]),[E,D]=(0,l.useState)([]),[F,R]=(0,l.useState)("1/10 (.1)"),productListFor=e=>{let t=w.species.find(t=>t.species_name===e);return[h.AM,...((null==t?void 0:t.products)||[]).map(e=>e.product_name)]};return(0,a.jsx)(u.zt,{store:L,children:(0,a.jsxs)(s.Z,{sx:{padding:"16px",height:"100vh",display:"flex",flexDirection:"column"},children:[(0,a.jsxs)(s.Z,{sx:{display:"flex",gap:"8px",marginBottom:"12px"},children:[C.map(r=>(0,a.jsx)(s.Z,{component:"button","data-testid":"harness-".concat(r.key),onClick:()=>t(r.key),sx:{padding:"6px 14px",borderRadius:"6px",border:"1px solid #ccc",cursor:"pointer",fontFamily:"inherit",backgroundColor:e===r.key?"#1E6B21":"#fff",color:e===r.key?"#fff":"#2c2c2c"},children:r.label},r.key)),(0,a.jsxs)(i.Z,{sx:{alignSelf:"center",fontSize:"12px",color:"#7e7e7e"},children:["fixture data \xb7 no API \xb7 ",p.ZL," is the real DataGrid and is not mounted here"]})]}),(0,a.jsxs)(s.Z,{sx:{display:"flex",alignItems:"center",gap:"10px",marginBottom:"12px"},children:[[{key:"fixed",label:"1/10 ac",value:"1/10 (.1)"},{key:"baf",label:"BAF 10",value:"BAF 10"},{key:"unsized",label:"No size",value:""}].map(e=>(0,a.jsx)(s.Z,{component:"button","data-testid":"harness-size-".concat(e.key),onClick:()=>R(e.value),sx:{padding:"3px 10px",borderRadius:"4px",border:"1px solid #ccc",cursor:"pointer",fontFamily:"inherit",fontSize:"12px",backgroundColor:F===e.value?"#1E6B21":"#fff",color:F===e.value?"#fff":"#2c2c2c"},children:e.label},e.key)),(0,a.jsx)(x,{trees:v,plotSize:F})]}),(0,a.jsxs)(s.Z,{sx:{flex:1,minHeight:0,display:"flex",gap:"16px"},children:[e===p.np&&(0,a.jsx)(f,{trees:v,fieldObjects:j,selectedTrees:r,editingTreeId:n,onToggleSelect:e=>o(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]),onOpenTree:d}),"tally-nospec"===e&&(0,a.jsx)(_,{trees:[],currentSpec:null,speciesList:[],productListFor:productListFor,canEdit:!0,onTally:()=>{}}),"tally-nospecies"===e&&(0,a.jsx)(_,{trees:[],currentSpec:{id:"empty",name:"Test Spec",species:[]},speciesList:[],productListFor:productListFor,canEdit:!0,onTally:()=>{}}),e===p.Io&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(_,{trees:[...v,...N],currentSpec:w,speciesList:w.species.map(e=>e.species_name),productListFor:productListFor,canEdit:!0,buffer:c,onTallyCell:e=>m(t=>(0,b.j5)(t,{...e,dataSchema:"standard"})),onRemoveCell:e=>m(t=>(0,b.yX)(t,e)),onSaveTally:()=>{let e=(0,b.WP)(c,"harness-plot");return I(t=>[...t,...e.map((e,r)=>({id:e.id,tree_number:100+t.length+r,data:e.data}))]),m((0,b.gS)()),!0}}),(0,a.jsx)("pre",{"data-testid":"harness-tally-state",style:{fontSize:11,padding:8,background:"#f5f5f5",overflow:"auto",maxHeight:160},children:JSON.stringify({unsaved:(0,b.BX)(c),saved:N.length,wouldSend:(0,b.WP)(c,"harness-plot").map(e=>({id:e.id,...e.data}))},null,1)})]}),"entry-seeded"===e&&(0,a.jsx)(g,{projectId:S,plotId:"harness-plot",cruisingSpec:k,fields:P,treeSchema:"standard",existingSpecies:[],seedValues:{species:"Loblolly Pine",product:"Sawtimber"},treeCount:v.length,canHide:!1,onClose:()=>{},onSaved:()=>{}}),"entry"===e&&(0,a.jsx)(g,{projectId:S,plotId:"harness-plot",cruisingSpec:k,fields:P,treeSchema:"standard",existingSpecies:[],treeCount:v.length,onClose:()=>{},onSaved:()=>{}}),"entry-editing"===e&&(0,a.jsx)(g,{projectId:S,plotId:"harness-plot",cruisingSpec:k,fields:P,treeSchema:"standard",existingSpecies:[],editingTree:v[0],treeCount:v.length,onClose:()=>{},onSaved:()=>{}}),"grade"===e&&(0,a.jsx)(s.Z,{sx:{flex:1,minHeight:0},children:(0,a.jsx)(y,{grades:w.species[0].products[0].grades,value:O,values:{species:"Loblolly Pine",product:"Sawtimber",height:80},stumpHeight:.5,bolt:16,onChange:T})}),"grade-stopper"===e&&(0,a.jsx)(s.Z,{sx:{flex:1,minHeight:0},children:(0,a.jsx)(y,{grades:w.species[0].products[0].grades,value:E,values:{species:"Loblolly Pine",product:"Sawtimber",height:80,stopper_height:10},stumpHeight:.5,bolt:16,onChange:D})})]})]})})}},5152:function(e,t,r){e.exports=r(1342)}},function(e){e.O(0,[1324,9774,2888,179],function(){return e(e.s=22469)}),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.